Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 441
Default Public vs Global

I have noticed that I can declare a variable "Public" or "Global".

What is the difference between the two?
Is there any advantage of using one over the other?

Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Public vs Global

"quartz" wrote in message
...
I have noticed that I can declare a variable "Public" or "Global".

What is the difference between the two?
Is there any advantage of using one over the other?


There is no difference in effect between the two. The Global keyword is
a holdover from earlier versions of the BASIC. Most VB/VBA programmers use
Public.

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Public vs Global

I believe Global is retained for compatibility. Should be no difference.

--
Tom Ogilvy

"quartz" wrote in message
...
I have noticed that I can declare a variable "Public" or "Global".

What is the difference between the two?
Is there any advantage of using one over the other?

Thanks in advance.



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
Using A Public Function / carl Excel Worksheet Functions 1 April 6th 06 09:13 PM
Dim vs. Public Jason Morin Excel Programming 7 January 27th 05 01:13 PM
Public declaration Greg[_16_] Excel Programming 2 January 21st 05 10:53 PM
public sub Bob Excel Programming 3 December 10th 04 08:49 PM
Public Sub Help No Name Excel Programming 2 May 18th 04 11:09 PM


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

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

About Us

"It's about Microsoft Excel"