Send Userform results to worksheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a userform that prompts the user for information that will be used in
formulas and in some vba code. The userform contains:
listbox1 - which collects the month
listbox2 - which collects the year
listbox3 - which collects one of two variables
Textbox - Company name
The value of listbox3 needs to reference to in an IF statement and the other
three (listboxes 1 & 2 and textbox are all concatenated in a saveas command
to form a file name.
What would be the best way to reference these values?
Or would it be easier to send the values to a specific cell to be referenced?
 
Hi,

Something like :

If listbox3.value = whatever then
' your code
End if

FileName=Listbox1.value & listbox2.value & textbox1.value
 
You have another response at your other thread.
I have a userform that prompts the user for information that will be used in
formulas and in some vba code. The userform contains:
listbox1 - which collects the month
listbox2 - which collects the year
listbox3 - which collects one of two variables
Textbox - Company name
The value of listbox3 needs to reference to in an IF statement and the other
three (listboxes 1 & 2 and textbox are all concatenated in a saveas command
to form a file name.
What would be the best way to reference these values?
Or would it be easier to send the values to a specific cell to be referenced?
 
Hey Toppers!
I'm sorry, the IF statement was a formula, not VBA - I should have been more
clear on that. Would I be able to reference the listbox in a formula?
 
Back
Top