Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default load event when specific workbook is opened


After reading many threads on this topic, I still can't come up with the
proper coding to do what I want to do. When I open a specific workbook,
I'd like for a specific event to be active as long as that workbook is
the active one, and I'd like that specific event to activate for any
worksheet within the workbook.

I have used the Auto_Open event, and I thought I should call the
Workbook_Activate event from the Auto_Open. This doesn't seem to be
working. Suggestions for a workable solution??


--
itsthebike
------------------------------------------------------------------------
itsthebike's Profile: http://www.excelforum.com/member.php...o&userid=27425
View this thread: http://www.excelforum.com/showthread...hreadid=559201

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default load event when specific workbook is opened

Not sure what you mean by "specific event to be active as that workbook is
the active one". An event cannot be active. It is something you respond to
by putting code in its signature.

If that WB is not active, its Workbook_SheetActivate will not fire.
Unless you turn off events (Application.EnableEvents=False) all events are
available in the active WB/WS depending where the code resides.
If you use Application Level Events
(http://www.cpearson.com/excel/AppEvent.htm) the whole of Excel is available
to you.

NickHK

"itsthebike" wrote
in message ...

After reading many threads on this topic, I still can't come up with the
proper coding to do what I want to do. When I open a specific workbook,
I'd like for a specific event to be active as long as that workbook is
the active one, and I'd like that specific event to activate for any
worksheet within the workbook.

I have used the Auto_Open event, and I thought I should call the
Workbook_Activate event from the Auto_Open. This doesn't seem to be
working. Suggestions for a workable solution??


--
itsthebike
------------------------------------------------------------------------
itsthebike's Profile:

http://www.excelforum.com/member.php...o&userid=27425
View this thread: http://www.excelforum.com/showthread...hreadid=559201



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default load event when specific workbook is opened


Nick,
Thanks for your reply. As a relative VB novice, please pardon my
incorrect terminology. What I'm trying to accomplish is something
similar to the following:

Sub Workbook_Open()
''Call the 'sub'
Workbook_Activate
End Sub

-------------------------------
Sub Workbook_Activate()
Workbook_Activate
End Sub

-------------------------------
Sub Workbook_Deactivate()
Workbook_Deactivate
End Sub

= = = = = = = = = = = = = = = =

What I need to happen is:
- target WB is opened
- then, anytime any WS in the target workbook is the active WS, then
have the code identified as "xWorkbook_Activate" (above) be activated
once a certain action takes place (i.e. cursor moves based on an entry
being made in a specific column). Hopefully this adds more
understanding to the nature of the issue. Thanks.


--
itsthebike
------------------------------------------------------------------------
itsthebike's Profile: http://www.excelforum.com/member.php...o&userid=27425
View this thread: http://www.excelforum.com/showthread...hreadid=559201

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
Userform to load when Workbook is opened Ozgur Pars[_2_] Excel Programming 4 April 18th 06 02:41 PM
Load a range of cells into a dataset with an opened workbook instance. [email protected] Excel Programming 0 May 31st 05 04:32 PM
Event to call before a opened workbook is recalculated Torben Laursen[_2_] Excel Programming 4 December 16th 04 05:32 PM
Opening a workbook if not opened, going to it if already opened neotokyo[_2_] Excel Programming 1 September 24th 04 07:17 PM
How to see if the opened workbook is opened by another user ? balexis Excel Programming 1 August 18th 04 04:11 PM


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