Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Calling the workbook_open sub

Posted on 2013-11-04
3
Medium Priority
?
355 Views
Last Modified: 2013-11-04
How do call the workbook_open sub from one of the worksheet modules or from a new module?
0
Comment
Question by:Saqib Husain, Syed
3 Comments
 
LVL 81

Accepted Solution

by:
zorvek (Kevin Jones) earned 1600 total points
ID: 39621147
First, change it to a Public sub. Then call it:

    ThisWorkbook.Workbook_Open

Kevin
0
 
LVL 85

Assisted Solution

by:Rory Archibald
Rory Archibald earned 400 total points
ID: 39621168
Or use:
   Application.Run "'" & ThisWorkbook.Name & "'!thisworkbook.workbook_open"

Open in new window

and leave it private. Or better still, move the code to a regular module and call it from both locations. ;)
0
 
LVL 43

Author Closing Comment

by:Saqib Husain, Syed
ID: 39621194
Kevin,
Great, thanks. Just what I was looking for.

Rory,
Good to know, thanks.

Saqib
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question