Hi,
Do you mean something like ...
![]()
Private Sub CommandOK_Click() Dim i As Long For i = 1 To 120 Sheets("Data").Range("A" & i) = Me.Controls("TextBox" & i).Value Next i Unload Me End Sub
Hi,
Do you mean something like ...
![]()
Private Sub CommandOK_Click() Dim i As Long For i = 1 To 120 Sheets("Data").Range("A" & i) = Me.Controls("TextBox" & i).Value Next i Unload Me End Sub
Thanks. Great idea. I didn't realize you could use the controls collection like that.
Basically, I need to update a spreadsheet based on what is entered in a user-form. The user form is quite complex, basically a data entry form, with multiple tabbed pages, etc.
So, as long as I name the related text boxes with something simular and then a number (i.e. monthly1 - monthly10), I should be able to iterate through the correct boxes and update the appropriate spreadsheet row/column.
Sounds doable. Thanks.
However, there is no "update" button. Whatever the user enters it automatically sent to the sheet. What event would you use to trap this?
As in the example a command button with OK caption for user to click on ...
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks