Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 46
Default Global variables

How does one establish global variables?

Ed
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 46
Default 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.

  #4   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 46
Default 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.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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.



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
global variables Mike Archer Excel Programming 4 May 3rd 06 07:33 PM
Global Variables mattsvai[_11_] Excel Programming 4 February 3rd 06 05:02 PM
Global Variables Francis Brown Excel Programming 9 November 27th 05 06:14 PM
global variables [email protected] Excel Programming 3 November 16th 05 11:44 PM
Global Variables Ernst Guckel[_4_] Excel Programming 2 May 7th 05 11:10 PM


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

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"