Run option fo Macro greyed out when I declare Static variable in a

G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top