LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
bdg bdg is offline
external usenet poster
 
Posts: 4
Default Sheet activate method in beforesave event

Hi

I would like to know why activate method in beforesave event does not
work. Could you help me?
(If you know, please let me know url of MSDN page explaining this
restriction.)

-----------ThisWorkbook Module--------------
Sub test()
ActiveWorkbook.Save
End Sub
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
Cancel As Boolean)
Sheets("sheet2").Activate
End Sub
----------------------------------------------------

Case 1 When save by file menu or Ctrl+s
"Sheets("sheet2").Activate" will work.

Case 2 When run test procedure
"Sheets("sheet2").Activate" will not work.

Thanks to all,
bdg

 
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
Sheet Activate method in beforesave event bdg Excel Programming 0 March 31st 06 05:00 PM
Sheet Activate method in beforesave event bdg Excel Programming 0 March 31st 06 05:00 PM
Save method and BeforeSave event [email protected] Excel Programming 1 July 15th 05 04:58 AM
Return to Current Sheet in On (sheet activate) event macro Paul Moles Excel Programming 1 March 27th 05 03:16 PM
Activate sheet event Mike Fogleman Excel Programming 5 January 18th 04 11:02 PM


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