Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default Send Userform results to worksheet

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default Send Userform results to worksheet

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Send Userform results to worksheet

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default Send Userform results to worksheet

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Send Form Results to Excel WorkSheet cjshaffer Excel Worksheet Functions 2 November 28th 08 04:30 PM
Can I send results of a formula to multiple cells? Scarlett O Excel Programming 2 April 27th 05 06:28 AM
HOW TO send data to another program and get back results in Excel? Yong[_2_] Excel Programming 1 December 11th 04 01:54 AM
how to send a workbook shortcut as attachement in an e-mail from a userform Valeria[_2_] Excel Programming 5 January 22nd 04 12:02 PM
Send a Userform by email Fede Querio Excel Programming 0 July 27th 03 11:06 PM


All times are GMT +1. The time now is 05:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"