Home |
Search |
Today's Posts |
#1
|
|||
|
|||
VBA passing variables through a function
I have a macro
Sub TestMacro(X,Y) ....calculations based on X and Y values End Sub By putting the "X,Y" in the macro, does this make it a function. Because when I try to look for the macro using the macro button on the toolbar the function "TestMacro" does not show up. It shows up when I remove the X,Y. Do you know what has changed? Also i this a good way to program, I want to be able to input values for X and Y so I thought this would be good since I wouldn't have to keep changing the "TestMacro". Sub macro1() X = 7 Y=5 Call TestMacro(X,Y) End sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Passing parameters Cel Ref) to Sum function | Excel Discussion (Misc queries) | |||
Changing worksheet cells from within a function | Setting up and Configuration of Excel | |||
Passing variables between a form and macro | New Users to Excel | |||
Can I use variables in a Range function? | Excel Discussion (Misc queries) | |||
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. | Excel Worksheet Functions |