Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run option fo Macro greyed out when I declare Static variable in a
I have a main procedure that accepts Amount and Account input fom the user,
copies it to the active worksheet then totals the values for each account. I declare the account totaling variables inside the sub procedure. If I declare the variables with as "Static TotalFlowers As Currency", then try to Run the Main procedure from the Spread Sheet the "Run, Edit, Step Into, Delete, and Options" are all greyed out. If I change the variable declairation to Dim I am able to run the Macro. I've tried Static Sub XXX with same results. I could declare the variables Public Global so they would retain thier value when the Sub Procedure is exited but Static is cleaner and should work. Help please - Ken H |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run option fo Macro greyed out when I declare Static variable in a
Put the values into cells on a worksheet.
"Ken H" wrote in message ... I have a main procedure that accepts Amount and Account input fom the user, copies it to the active worksheet then totals the values for each account. I declare the account totaling variables inside the sub procedure. If I declare the variables with as "Static TotalFlowers As Currency", then try to Run the Main procedure from the Spread Sheet the "Run, Edit, Step Into, Delete, and Options" are all greyed out. If I change the variable declairation to Dim I am able to run the Macro. I've tried Static Sub XXX with same results. I could declare the variables Public Global so they would retain thier value when the Sub Procedure is exited but Static is cleaner and should work. Help please - Ken H |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Declare variable as what? | Excel Programming | |||
Declare Variable | Excel Programming | |||
Declare Variable | Excel Programming | |||
Declare Variable | Excel Programming | |||
Declare Variable | Excel Programming |