Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Declare variable as what? N E Body Excel Programming 6 October 28th 04 01:06 AM
Declare Variable zapatista66[_14_] Excel Programming 0 October 7th 04 05:02 PM
Declare Variable zapatista66[_12_] Excel Programming 2 October 7th 04 04:55 PM
Declare Variable zapatista66[_13_] Excel Programming 0 October 7th 04 04:13 PM
Declare Variable zapatista66[_10_] Excel Programming 0 October 6th 04 09:02 PM


All times are GMT +1. The time now is 10:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"