Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there any way to get this to work?
ComboBox1 has an employee's name. Employee List is not the active worksheet. If Range("$A$3") = "Monday" Then TextBox4.Text = VLOOKUP(ComboBox1.Value,'Employee List'!$A$4:$H$1000,3,FALSE) End If |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try creating a range name on that sheet and use it in the listbox code
instead and se if that works TextBox4.Text = VLOOKUP(ComboBox1.Value,rngname,3,FALSE) -- Gary K "Patrick C. Simonds" wrote in message ... Is there any way to get this to work? ComboBox1 has an employee's name. Employee List is not the active worksheet. If Range("$A$3") = "Monday" Then TextBox4.Text = VLOOKUP(ComboBox1.Value,'Employee List'!$A$4:$H$1000,3,FALSE) End If |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I get a Variable no defined error, and Employees is highlighted. Scope is
set to workbook. Here is my current code: If Range("$A$3") = "Monday" Then TextBox4.Text = VLookup(ComboBox1.Value, Employees, 3, False) End If "Gary Keramidas" wrote in message ... try creating a range name on that sheet and use it in the listbox code instead and se if that works TextBox4.Text = VLOOKUP(ComboBox1.Value,rngname,3,FALSE) -- Gary K "Patrick C. Simonds" wrote in message ... Is there any way to get this to work? ComboBox1 has an employee's name. Employee List is not the active worksheet. If Range("$A$3") = "Monday" Then TextBox4.Text = VLOOKUP(ComboBox1.Value,'Employee List'!$A$4:$H$1000,3,FALSE) End If |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I thought you were trying to set the rowsource of another sheet. but anyway
this woroks for me. I set up a form with a combobox, 4 textboxes and a command button. on sheet1 I created a range name employees, from i9:m12 names were listed in column I I set the rowsource for the combobox to employees when I loaded the form and clicked the command button, textbox4 filled in Private Sub CommandButton1_Click() Dim rng As Range Set rng = Range("employees") Me.TextBox4.Text = Application.VLookup(ComboBox1.Value, rng, 3, False) End Sub -- Gary K "Patrick C. Simonds" wrote in message ... I get a Variable no defined error, and Employees is highlighted. Scope is set to workbook. Here is my current code: If Range("$A$3") = "Monday" Then TextBox4.Text = VLookup(ComboBox1.Value, Employees, 3, False) End If "Gary Keramidas" wrote in message ... try creating a range name on that sheet and use it in the listbox code instead and se if that works TextBox4.Text = VLOOKUP(ComboBox1.Value,rngname,3,FALSE) -- Gary K "Patrick C. Simonds" wrote in message ... Is there any way to get this to work? ComboBox1 has an employee's name. Employee List is not the active worksheet. If Range("$A$3") = "Monday" Then TextBox4.Text = VLOOKUP(ComboBox1.Value,'Employee List'!$A$4:$H$1000,3,FALSE) End If |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you, that did the trick.
"Gary Keramidas" wrote in message ... I thought you were trying to set the rowsource of another sheet. but anyway this woroks for me. I set up a form with a combobox, 4 textboxes and a command button. on sheet1 I created a range name employees, from i9:m12 names were listed in column I I set the rowsource for the combobox to employees when I loaded the form and clicked the command button, textbox4 filled in Private Sub CommandButton1_Click() Dim rng As Range Set rng = Range("employees") Me.TextBox4.Text = Application.VLookup(ComboBox1.Value, rng, 3, False) End Sub -- Gary K "Patrick C. Simonds" wrote in message ... I get a Variable no defined error, and Employees is highlighted. Scope is set to workbook. Here is my current code: If Range("$A$3") = "Monday" Then TextBox4.Text = VLookup(ComboBox1.Value, Employees, 3, False) End If "Gary Keramidas" wrote in message ... try creating a range name on that sheet and use it in the listbox code instead and se if that works TextBox4.Text = VLOOKUP(ComboBox1.Value,rngname,3,FALSE) -- Gary K "Patrick C. Simonds" wrote in message ... Is there any way to get this to work? ComboBox1 has an employee's name. Employee List is not the active worksheet. If Range("$A$3") = "Monday" Then TextBox4.Text = VLOOKUP(ComboBox1.Value,'Employee List'!$A$4:$H$1000,3,FALSE) End If |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VLOOKUP, linked cell &combobox | Excel Worksheet Functions | |||
Combobox items determined by the selection in another combobox | Excel Programming | |||
big trouble with combobox/vlookup | Excel Discussion (Misc queries) | |||
combobox with vlookup | Excel Discussion (Misc queries) | |||
vlookup in combobox | Excel Programming |