Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 921
Default Userform and variable

Hi,

I have a userform, and you enter a number. Then based on the input the
userform runs code that uses the number. Usually I have the input box, where
the number is input, linked to the worksheet, then the code references the
worksheet

x = Sheets("Sheet1").range("a1").value

then it does the code, but is their a direct way to set variables using the
input in the userform.


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Userform and variable

Jeff,

It depends on the control, but something like

Variable = UserformName.ControlName.Value

..Value might be .Text, etc. depending on the control

HTH,
Bernie
MS Excel MVP


"Jeff" wrote in message
...
Hi,

I have a userform, and you enter a number. Then based on the input the
userform runs code that uses the number. Usually I have the input box, where
the number is input, linked to the worksheet, then the code references the
worksheet

x = Sheets("Sheet1").range("a1").value

then it does the code, but is their a direct way to set variables using the
input in the userform.




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
Defining UserForm Caption from a Variable [email protected] Excel Worksheet Functions 1 January 3rd 07 02:30 PM
Userform button setting variable from formula teepee Excel Discussion (Misc queries) 4 January 4th 06 06:59 PM
Userform button setting variable from formula teepee Excel Discussion (Misc queries) 0 January 3rd 06 08:26 PM
Sum cells based on a row variable and seperate column variable CheeseHeadTransplant Excel Worksheet Functions 10 September 23rd 05 06:59 PM
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? Daniel Excel Worksheet Functions 1 July 9th 05 03:05 AM


All times are GMT +1. The time now is 08:16 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"