Darren Smith
Well-known Member
- Joined
- Nov 23, 2020
- Messages
- 631
- Office Version
- 2019
- Platform
- Windows
I have tried to link a listbox item to a value in my textbox see below. Can anyone tell me why this won't work?
VBA Code:
Private Sub Bottom_of_Page_1_Change()
Dim LBox As ListBox
Dim x As Integer
Dim y As Integer
Set LBox = Me.ListBox4
x = 67
y = 61
If LBox = "STD Page 1" Then
Value = x
End If
If LBox = "STD Page 2" Then
Value = y
End If
End Sub