I know why I'm getting the error.....cos my macro begins with:
sub macroname(HWflag as integer)
if HWflag = 1 then goto 100
I need the variable passed from another macro for reasons that don't matter but I also need to be able to run this macro from a button. I get the error when running it from a button, obviously because the HWflag variable doesnt exist at that point but does when this macro is run from another macro. I've tested running this from a button without the (HWflag as integer) and it works fine so I'm positive what the error is, I just don't know how to cure it.
What I need to know is how to pass a variable (of 0 value) to this macro from a command button click.
I'm sure this is a bonehead question from a noob though.
Bookmarks