View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mike Rogers[_2_] Mike Rogers[_2_] is offline
external usenet poster
 
Posts: 284
Default Sub, Private Sub, Public Sub

Thanks for the explainations guys, now I will try to figure out why they
worked on one machine and not the other! They are all stand alone macros.

Mike Rogers

"Chip Pearson" wrote:

It is a matter of what is called "scope". See
http://www.cpearson.com/excel/scope.aspx for a full discussion of
scope as it applies to both variables and procedures.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com



On Wed, 14 Apr 2010 21:11:02 -0700, Mike Rogers
<Mike060349@NoxSpamxAOLDOTcom wrote:

I got a different lap top and when I moved my Personal.xls from one to the
other some of my macros were not on the list of macros when you go to
toolsmacros. Although when I look in the code they are there. I figured
out that the ones that were "Private Sub" macros were no working. I also
figured that when I changed them to just "Sub" they worked. I do know that
if "It aint broke don't fix it, cus to try is usually to fix it till it is
broke." But what is the difference between "Sub", "Private Sub", & "Public
Sub"?

Mike Rogers
xl2k on windows 7

.