Help
I have recreated the macro as described on pages 171 to 172, Ch 9 of VBA & Macros for MS Excel. The code for when the user changes from selecting a value in the "ListBox1", to selecting "TextBox1", basically looks like this.
Private Sub TextBox1_GotFocus()
Dim IngFound As Range
With Range("IngList")
Set IngFound = .Find(ListBox1.Value)
With Range(IngFound.Address)
TextBox2 = .Offset(0, 3)
End With
End With
End Sub
This basically looks up the selected value "IngFound" with "ListBox1", from within a defined range "IngList" on a worksheet. It then should update "TextBox2" with the value 3 cells to the right of the found value.
All Feautres here are on the same userform. I have tried the process as Click() as well as GotFocus(), but both without success. I have also tried turning TextBox2 into a label, but again this has no effect.
The "IngList" range is arranged in colums, and four colums wide. from my understanding this process is attempting to mimic the vlookup process from within excel, but I cannot get it to go.
I am running Excel 2000, and VB6, and hoping that this is not a version issue. I look forward to any help anyone can give.
I have recreated the macro as described on pages 171 to 172, Ch 9 of VBA & Macros for MS Excel. The code for when the user changes from selecting a value in the "ListBox1", to selecting "TextBox1", basically looks like this.
Private Sub TextBox1_GotFocus()
Dim IngFound As Range
With Range("IngList")
Set IngFound = .Find(ListBox1.Value)
With Range(IngFound.Address)
TextBox2 = .Offset(0, 3)
End With
End With
End Sub
This basically looks up the selected value "IngFound" with "ListBox1", from within a defined range "IngList" on a worksheet. It then should update "TextBox2" with the value 3 cells to the right of the found value.
All Feautres here are on the same userform. I have tried the process as Click() as well as GotFocus(), but both without success. I have also tried turning TextBox2 into a label, but again this has no effect.
The "IngList" range is arranged in colums, and four colums wide. from my understanding this process is attempting to mimic the vlookup process from within excel, but I cannot get it to go.
I am running Excel 2000, and VB6, and hoping that this is not a version issue. I look forward to any help anyone can give.