LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default personal.xls

The events in the personal.xls workbook, as you have them
written, apply only to that workbook. For example, the Activate
event will trigger only when personal.xls workbook is activated,
not when any workbook is activated. You probably need to use
application events. See
http://www.cpearson.com/excel/appevent.htm for details.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Brian2577"
wrote in
message
...

Question about personal.xls workbook.

Entering the code below in the personal.xls workbook will
activate the
message box every time I open any Excel application.

Public Sub Workbook_Open()
MsgBox ("Hello")
End Sub

However, when I enter the following code in the personal
workbook it
will not automatically activate the msgbox before print and
before
close.

Sub Workbook_Activate()
MsgBox ("Print")
End Sub

Public Sub Workbook_BeforeClose(Cancel As Boolean)
MsgBox ("goodbye")
End Sub

Why is this and how can I program a certain event to happen
before
printing and closing for all workbooks?

Thanks,
Brian


--
Brian2577
------------------------------------------------------------------------
Brian2577's Profile:
http://www.excelforum.com/member.php...o&userid=29713
View this thread:
http://www.excelforum.com/showthread...hreadid=494279



 
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
WHERE IS PERSONAL.XLS Bob Phillips New Users to Excel 0 July 13th 05 10:45 AM
Personal macro workbook and personal.xls John Kilkenny Excel Discussion (Misc queries) 1 June 14th 05 09:43 PM
Personal.xls R. SRIKANTH[_2_] Excel Programming 1 February 10th 04 09:52 AM
personal.htm & personal.xls in Macro Rasoul Khoshravan Azar Excel Programming 0 January 21st 04 05:27 PM


All times are GMT +1. The time now is 11:20 AM.

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

About Us

"It's about Microsoft Excel"