View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jezebel[_3_] Jezebel[_3_] is offline
external usenet poster
 
Posts: 45
Default 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