Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro to open multiple macros

The macros are in:

VBA project (Filename.xls)
Microsoft excel objects
Sheet 1
Sheet 2 (Here is where the macros are(the sheets))
Etc...

Thanks



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default Macro to open multiple macros

Stu,

So call like

Call Worksheets("Sheet1").macro1

Call Worksheets("Sheet2").macro2

But make sure they are not private.

Also, why have you put macros in a sheet module? If you want to call them
from elsewhere it is easier to put them in a normal code module
(InsertModule).

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Stu" wrote in message
...
The macros are in:

VBA project (Filename.xls)
Microsoft excel objects
Sheet 1
Sheet 2 (Here is where the macros are(the sheets))
Etc...

Thanks



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro to open multiple macros

Because I don't know how to put them in a sheet module and link it to
the sheet. But i saw sheet 1, sheet 2, etc... and thought I can put it
there because the macro will go with the sheet.

(Im new to macros so i havent a clue what im doing most of the time)

Thanks



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro to open multiple macros

When I try to run the macro which opens macros from other sheets i get
an error message saying:

Microsoft Visual Basic (In top bar)

Subscript out of range

any ideas as to why this happens?

Thanks



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default Macro to open multiple macros

Stu,

That sounds as if you have got the name of the worksheet wrong. As I
suggested, it would be of the format

Call Worksheets("Sheet1").macro1

and make sure it is not private. But again I suggest that you put it in a
normal code module, which you can create from the Insert menu.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Stu" wrote in message
...
When I try to run the macro which opens macros from other sheets i get
an error message saying:

Microsoft Visual Basic (In top bar)

Subscript out of range

any ideas as to why this happens?

Thanks



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro to open multiple macros

I have now created a module and its much easyer than what i was doing.

Thanks
Stu



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

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
Open file with macros David T Excel Discussion (Misc queries) 2 November 29th 07 06:23 PM
macro or code to open multiple workbooks Duane Reynolds Excel Discussion (Misc queries) 1 March 14th 06 08:18 AM
Macro for multiple open files [email protected] Excel Discussion (Misc queries) 1 February 13th 06 03:25 AM
How to stop file open macro prompt after deleting all macros? twor57 Excel Worksheet Functions 2 November 29th 05 05:00 PM
Macro that will add data from multiple workbooks to the 1st open r jbsand1001 Excel Discussion (Misc queries) 0 April 23rd 05 07:52 PM


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