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

.

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
Private vs Public Class Modules Ronald R. Dodge, Jr.[_2_] Excel Programming 8 January 21st 09 11:47 PM
Declaring subs Public vs Private Rick Excel Programming 9 December 19th 07 12:30 AM
difference between a private sub and a public function? Dave F Excel Discussion (Misc queries) 4 March 16th 07 07:38 PM
public but private variables No Name Excel Programming 2 May 19th 04 12:41 PM
Public subroutine called from a private sub Neil Bhandar[_2_] Excel Programming 1 January 15th 04 10:23 PM


All times are GMT +1. The time now is 07:06 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"