Solved

# Calling the workbook_open sub

Posted on 2013-11-04
338 Views
How do call the workbook_open sub from one of the worksheet modules or from a new module?
0
Question by:Saqib Husain, Syed
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 81

Accepted Solution

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

ThisWorkbook.Workbook_Open

Kevin
0

LVL 85

Assisted Solution

Rory Archibald earned 100 total points
ID: 39621168
Or use:
``````   Application.Run "'" & ThisWorkbook.Name & "'!thisworkbook.workbook_open"
``````
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

ID: 39621194
Kevin,
Great, thanks. Just what I was looking for.

Rory,
Good to know, thanks.

Saqib
0

## Featured Post

Question has a verified solution.

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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
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!
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
###### Suggested Courses
Course of the Month9 days, 9 hours left to enroll