Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
In a macro the variables are 'generally' initialised at the top of the code:- Sub MyMacro() Dim x as Long Dim MyRange as range etc. By default when initialised they ere empty and you then have to assign a value Sub MyMacro() Dim x as Long Dim MyRange as range x=999 set MyRange=range("A1:A1000") Mike "Alberto Ast" wrote: Thanks Ryan.. Somehow I can not see this post when I list all those I have had some activities but Mike H have forward me the link and I was able to see the post... any way... pearson link showed me how to declare variables but how do I gave them an initial value different than its default value? "Ryan H" wrote: I guess it would help if I gave you the link, sorry. http://www.cpearson.com/excel/DeclaringVariables.aspx -- Cheers, Ryan "Ryan H" wrote: You declare variables many ways. Check this link out by Chip Pearson. It helped me when I was learning. Hope this helps! If so, let me know, click "YES" below. -- Cheers, Ryan "Alberto Ast" wrote: I need to initiate some variables... to initiate the variables within a form I use Private Sub UserForm_Initialize() ...... End Sub How do I do it within a module? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Not at all clear on use of variables and/or object variables | Excel Discussion (Misc queries) | |||
Storing variables in a macro and using those variables to performcalculations. | Excel Programming | |||
Batch file initiation from Excel macro? | Excel Discussion (Misc queries) | |||
excel - macro - automatic initiation of a macro at a pre-specified "system time" | Excel Programming | |||
excel macro - macro initiation upon hitting the ener key | Excel Programming |