stirlingmw
Board Regular
- Joined
- Feb 18, 2013
- Messages
- 75
Afternoon all
I am using the code below to populate a Userform from data held on "Project Master" Worksheet. I am trying to add a command button to transition to previous and next rows, but for some reason the code i tried either jumped me to the header row (row 1) of the "Project Master" worksheet or just did nothing. I have since deleted that code to try again.
Can you help.
regards
Steve
I am using the code below to populate a Userform from data held on "Project Master" Worksheet. I am trying to add a command button to transition to previous and next rows, but for some reason the code i tried either jumped me to the header row (row 1) of the "Project Master" worksheet or just did nothing. I have since deleted that code to try again.
Can you help.
Code:
totRows = Worksheets("Project Master").Range("A1").CurrentRegion.Rows.count
For i = 2 To totRows
If Trim(Worksheets("Project Master").Cells(i, 1)) = Trim(CmbFindProject.text) Then
TxtProject.text = Worksheets("Project Master").Cells(i, 1).value
CmbTeam.text = Worksheets("Project Master").Cells(i, 2).value
CmbCDTLead.text = Worksheets("Project Master").Cells(i, 3).value
TxtDESTeam.text = Worksheets("Project Master").Cells(i, 4).value
.etc....
regards
Steve