Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Manually call Workbook_Activate procedure

Is there a way to manually run the Workbook_Activate event procedure from
another workbook without actually activating the workbook?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Manually call Workbook_Activate procedure

Very easy:

Construct the Workbook Activate sub to do nothing other than call another
public sub in a standard module. This "other" sub will do the real work.

In this way the "other "sub will be available to other projects/modules.


--
Gary's Student
gsnu200704


"joeeng" wrote:

Is there a way to manually run the Workbook_Activate event procedure from
another workbook without actually activating the workbook?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Manually call Workbook_Activate procedure

Your response was very inciteful. However, it still left the question of how
to call the "other" sub, anyway. In figuring that out, I did find a way to
actually address the Workbook_Activate sub directly.

Application.Run "'Other workbook name.xls'!Thisworkbook.Workbook_Activate"

Workbook_Activate can be either private or public sub. The single quotes
around the workbook name are used just in case the workbook name contains
spaces.

joeeng

"Gary''s Student" wrote:

Very easy:

Construct the Workbook Activate sub to do nothing other than call another
public sub in a standard module. This "other" sub will do the real work.

In this way the "other "sub will be available to other projects/modules.


--
Gary's Student
gsnu200704


"joeeng" wrote:

Is there a way to manually run the Workbook_Activate event procedure from
another workbook without actually activating the workbook?

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
procedure call BorisS Excel Programming 1 September 18th 06 07:16 AM
Call Procedure Ronbo Excel Programming 4 February 23rd 05 08:11 PM
Where else to look for procedure call Lulu Excel Programming 2 November 24th 04 02:14 AM
call procedure bob Excel Programming 1 August 9th 03 12:40 AM
procedure won't call John Gittins Excel Programming 0 August 5th 03 08:17 PM


All times are GMT +1. The time now is 06:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"