Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
PA PA is offline
external usenet poster
 
Posts: 101
Default How to run macro for "private sub.."

Dear All,

I try to run this macro :

For example:

Private Sub Workbook_Open()
Msgbox "Hello"
End Sub

But I can not see the macro name at all at macro dialog box (Tol--Macro--..)

Is there any way that I need to do enable me to run this macro without
delete the word"private"? eg via macro button or shorcut as usual

many thanks for your advise

PA



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to run macro for "private sub.."


Private means "For Excel to use, not users" so you would need to change
the name of the macro to make it user-accessible.


--
JBeaucaire
------------------------------------------------------------------------
JBeaucaire's Profile: http://www.thecodecage.com/forumz/member.php?userid=73
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=46879

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default How to run macro for "private sub.."

Make it Public not Private, or create a new Public Sub which calls it.

Tim

"JBeaucaire" wrote in message
...

Private means "For Excel to use, not users" so you would need to change
the name of the macro to make it user-accessible.


--
JBeaucaire
------------------------------------------------------------------------
JBeaucaire's Profile:
http://www.thecodecage.com/forumz/member.php?userid=73
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=46879



  #4   Report Post  
Posted to microsoft.public.excel.programming
PA PA is offline
external usenet poster
 
Posts: 101
Default How to run macro for "private sub.."

Dear JBeaucaire,

Do you mean there is no way to run that macro other than remove that word
"private" ?

Thanks alot

PA


"JBeaucaire" wrote:


Private means "For Excel to use, not users" so you would need to change
the name of the macro to make it user-accessible.


--
JBeaucaire
------------------------------------------------------------------------
JBeaucaire's Profile: http://www.thecodecage.com/forumz/member.php?userid=73
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=46879


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default How to run macro for "private sub.."

It is not meant to be run manually. It is event code that runs when the
workbook oipens.

It is meant to be placed in Thisworkbook module.


Gord Dibben MS Excel MVP

On Mon, 5 Jan 2009 19:29:01 -0800, PA wrote:

Dear All,

I try to run this macro :

For example:

Private Sub Workbook_Open()
Msgbox "Hello"
End Sub

But I can not see the macro name at all at macro dialog box (Tol--Macro--..)

Is there any way that I need to do enable me to run this macro without
delete the word"private"? eg via macro button or shorcut as usual

many thanks for your advise

PA





  #6   Report Post  
Posted to microsoft.public.excel.programming
PA PA is offline
external usenet poster
 
Posts: 101
Default How to run macro for "private sub.."

Dear All,

It does help

Thanks alot.

Best Regards

PA
"Gord Dibben" wrote:

It is not meant to be run manually. It is event code that runs when the
workbook oipens.

It is meant to be placed in Thisworkbook module.


Gord Dibben MS Excel MVP

On Mon, 5 Jan 2009 19:29:01 -0800, PA wrote:

Dear All,

I try to run this macro :

For example:

Private Sub Workbook_Open()
Msgbox "Hello"
End Sub

But I can not see the macro name at all at macro dialog box (Tol--Macro--..)

Is there any way that I need to do enable me to run this macro without
delete the word"private"? eg via macro button or shorcut as usual

many thanks for your advise

PA




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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Read ".dll" files, the Macro "work flow" and the actual values of the variables when Macro is running [email protected] Excel Programming 5 May 16th 07 08:18 PM
Change default in input box from "20" to "000000"? Have macro continue on to name sheet tab? StargateFanFromWork[_4_] Excel Programming 7 October 29th 06 11:46 AM
Macro to concatenate into "B1" B2 thru B"x" based on new data in "Col A" Dennis Excel Discussion (Misc queries) 0 July 17th 06 02:38 PM
Sending macro based e-mail with built-in "Heading" and "Text" Prabha Excel Programming 3 January 17th 05 02:11 PM


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