Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Run Macro on Worksheet Activate

Hello,
I'm trying to run some code when a worksheet is activiated (when the user
views it via the tabs). I tried using this code and adding to the worksheet
I wanted via the VBA editor:

Private Sub Worksheet_Activate()
'do stuff
msgbox("TEST")
End Sub

Nothing happens when the worksheet is activated. What am I doing wrong?
many thanks.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run Macro on Worksheet Activate

Hello Matthew,

That code works on me, please try type the code below in the immediat
window and press Enter key.

Application.EnableEvents may has been set as False.


Code
-------------------

Application.EnableEvents=True

-------------------


--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run Macro on Worksheet Activate

You did put it in "Sub auto_open()", right?
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
how to activate the scrolling within the worksheet? sridhar Excel Discussion (Misc queries) 0 July 24th 08 10:08 AM
activate macro Jase Excel Discussion (Misc queries) 1 June 9th 08 08:25 PM
Calling a macro from Worksheet--Activate Fatz Excel Discussion (Misc queries) 3 March 5th 08 11:07 PM
Worksheet- activate macro sarah Excel Discussion (Misc queries) 3 March 21st 07 04:44 PM
Worksheet.activate Jeff Excel Discussion (Misc queries) 1 December 14th 04 01:52 PM


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