Send Userform results to worksheet

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?
 
G

Guest

Hi,

Something like :

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

FileName=Listbox1.value & listbox2.value & textbox1.value
 
D

Dave Peterson

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?
 
G

Guest

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top