colinharwood
Active Member
- Joined
- Jul 27, 2002
- Messages
- 426
- Office Version
- 2019
- Platform
- Windows
Hi
I have the following code, which runs when a command button on a userform is pressed.
I would like the userform1 called to have the variables First & Last shown in the two textboxes on the userform1, but they just show a cursor.
If I look in the debug window, the two variable show the right reults, but they will not show in the textboxes.
Any help much appreciated
Private Sub update_Click()
Dim lastRow
Dim First As String
Dim Last As String
Sheets("TMES Members").Select
Application.ScreenUpdating = False
First = AKA.Text
Last = Surname.Text
lastRow = Range("B200").End(xlUp).Offset(1, -1).Row
Range("B" & lastRow).Value = Surname.Value
Range("C" & lastRow).Value = AKA.Text
Range("D" & lastRow).Value = Forenames.Text
SortAndAddBorders
NewMember.Hide
Application.ScreenUpdating = True
UserForm1.Show
TextBox1.Value = First
TextBox2.Value = Last
I have the following code, which runs when a command button on a userform is pressed.
I would like the userform1 called to have the variables First & Last shown in the two textboxes on the userform1, but they just show a cursor.
If I look in the debug window, the two variable show the right reults, but they will not show in the textboxes.
Any help much appreciated
Private Sub update_Click()
Dim lastRow
Dim First As String
Dim Last As String
Sheets("TMES Members").Select
Application.ScreenUpdating = False
First = AKA.Text
Last = Surname.Text
lastRow = Range("B200").End(xlUp).Offset(1, -1).Row
Range("B" & lastRow).Value = Surname.Value
Range("C" & lastRow).Value = AKA.Text
Range("D" & lastRow).Value = Forenames.Text
SortAndAddBorders
NewMember.Hide
Application.ScreenUpdating = True
UserForm1.Show
TextBox1.Value = First
TextBox2.Value = Last