My UserForm has 33 TextBoxes<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o></o>
To add Textbox values to Sheet2, I use...<o></o>
<o></o>
<o></o>
<o></o>
Is there a way to code the Dims for the entire UserForm…so I don’t have to Dim each Sub?<o></o>
<o></o>
To add Textbox values to Sheet2, I use...<o></o>
<o></o>
Code:
[FONT=Verdana][SIZE=1]Private Sub TextBox3_AfterUpdate()<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1]Dim iRow As Long<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1]Dim WS As Worksheet<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1]Set WS = Worksheets("Sheet2")<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1]<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1]'find first empty row in database<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1]iRow = WS.Cells(Rows.Count, 1) _<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1] .End(xlUp).Offset(1, 0).Row<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1]<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1]WS.Cells(iRow, 3).Value = Me.TextBox3.Value<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1]End Sub<o:p></o:p>[/SIZE][/FONT]
<o></o>
Is there a way to code the Dims for the entire UserForm…so I don’t have to Dim each Sub?<o></o>