Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Something like : If listbox3.value = whatever then ' your code End if FileName=Listbox1.value & listbox2.value & textbox1.value "TimT" wrote: 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? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You have another response at your other thread.
TimT wrote: 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? -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? "Toppers" wrote: Hi, Something like : If listbox3.value = whatever then ' your code End if FileName=Listbox1.value & listbox2.value & textbox1.value "TimT" wrote: 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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Send Form Results to Excel WorkSheet | Excel Worksheet Functions | |||
Can I send results of a formula to multiple cells? | Excel Programming | |||
HOW TO send data to another program and get back results in Excel? | Excel Programming | |||
how to send a workbook shortcut as attachement in an e-mail from a userform | Excel Programming | |||
Send a Userform by email | Excel Programming |