rharri1972
Board Regular
- Joined
- Nov 12, 2021
- Messages
- 132
- Office Version
- 2019
- Platform
- Windows
I have a listbox1 on userform Customer Activity Center.
Listbox1 is filled with many customers and is multicolumn. Single Select
I also have a command button at the bottom (Insert Order) of the same userform.
I can click on or highlight a customer in listbox 1.... click on the button... and I have had help with code that enables the referenced value in listbox1.listindex(0) ( or the Customer ID) be searched out in Column A of the activated worksheet "Customers" and the cell with the same value selected.
Here is the code for that:
My issue is this... I am trying to get the value from the active cell into textbox14 on userform3.
Since my button click ends with userform3.show
I have gone into userform3_Initialize()
and used code:
Everything I've read says this should work but it doesn't . I have even put this code inside of the actual textbox14 code but still nothing. Still so new maybe i just don't know where to put the code or maybe i'm just way off base with my code. Any help ? Finding the cell to activate with the same value as listbox listindex(0) works great...it moves to each cell related to whatever customer. I just can't get the cells value to textbox14 on userform3.
Any help will be greatly appreciated!!
Listbox1 is filled with many customers and is multicolumn. Single Select
I also have a command button at the bottom (Insert Order) of the same userform.
I can click on or highlight a customer in listbox 1.... click on the button... and I have had help with code that enables the referenced value in listbox1.listindex(0) ( or the Customer ID) be searched out in Column A of the activated worksheet "Customers" and the cell with the same value selected.
Here is the code for that:
Code:
Private Sub CommandButton2_Click() '<--------- INSERT ORDER BUTTON on Customer Activity Center user form
Dim R As Range
Set R = Sheets("Customers").Columns("A").Find( _
ListBox1.Value, LookIn:=xlValues, LookAt:=xlWhole)
If R Is Nothing Then
MsgBox "Not found"
Else
'Activate sheet of found cell
R.Parent.Activate
'Select the cell itself
R.Select
UserForm3.Show '<--------Customer Order Form
End If
End Sub
My issue is this... I am trying to get the value from the active cell into textbox14 on userform3.
Since my button click ends with userform3.show
I have gone into userform3_Initialize()
and used code:
Code:
me.textbox14.text = activecell.value
Everything I've read says this should work but it doesn't . I have even put this code inside of the actual textbox14 code but still nothing. Still so new maybe i just don't know where to put the code or maybe i'm just way off base with my code. Any help ? Finding the cell to activate with the same value as listbox listindex(0) works great...it moves to each cell related to whatever customer. I just can't get the cells value to textbox14 on userform3.
Any help will be greatly appreciated!!