ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Global variables (https://www.excelbanter.com/excel-programming/369522-global-variables.html)

Ed

Global variables
 
How does one establish global variables?

Ed

Bob Phillips

Global variables
 
Declare them outside of any macro, at the start of a standard module, and
declare them as Public.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Ed" wrote in message
...
How does one establish global variables?

Ed




Ed

Global variables
 
Thank you.


On Sun, 6 Aug 2006 18:24:52 +0100, "Bob Phillips"
wrote:

Declare them outside of any macro, at the start of a standard module, and
declare them as Public.


Ed

Global variables
 
Still having problems.

I set up a separate module with the Public variables as integers.

When I try to run the macro I get the message:


Compile error ambiguous name detected: v

Do you have any ideas?




On Sun, 6 Aug 2006 18:24:52 +0100, "Bob Phillips"
wrote:

Declare them outside of any macro, at the start of a standard module, and
declare them as Public.


NickHK

Global variables
 
Ed,
That normally means that you have 2 variables/functions etc with the same
name and scope.

NickHK

"Ed" wrote in message
...
Still having problems.

I set up a separate module with the Public variables as integers.

When I try to run the macro I get the message:


Compile error ambiguous name detected: v

Do you have any ideas?




On Sun, 6 Aug 2006 18:24:52 +0100, "Bob Phillips"
wrote:

Declare them outside of any macro, at the start of a standard module, and
declare them as Public.





All times are GMT +1. The time now is 07:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com