Solved

Calling the workbook_open sub

Posted on 2013-11-04
3
337 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
[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
  • Learn & ask questions
3 Comments
 
LVL 81

Accepted Solution

by:
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

by:Rory Archibald
Rory Archibald earned 100 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Compare Excel spreadsheet - 1 3 38
Re-order columns of data in Excel 3 55
Help to break down spreadsheet 3 39
Tricky Shapes formula part 4 4 13
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

756 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