ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Worksheet_Activate (https://www.excelbanter.com/excel-programming/277373-worksheet_activate.html)

Jim Carlock[_2_]

Worksheet_Activate
 
When does the Activate event occur? I've determined that it
occurs when clicking between tabs. It does NOT seem to occur
when the sheet is first loaded though.

--
Jim Carlock
http://www.microcosmotalk.com
Feel free to post back to the newsgroup!




Rob Bovey

Worksheet_Activate
 
"Jim Carlock" wrote in message
...
When does the Activate event occur? I've determined that it
occurs when clicking between tabs. It does NOT seem to occur
when the sheet is first loaded though.


Hi Jim,

Yes, the Worksheet Activate event only fires after its workbook has been
opened when the worksheet transitions from an inactive state to an active
state. This can be the result of clicking on its sheet tab to make it active
(assuming it wasn't already the active sheet) or unhiding it if it was
hidden. Doing any of these activities from VBA will also fire the event.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *



--
Jim Carlock
http://www.microcosmotalk.com
Feel free to post back to the newsgroup!






Jim Carlock[_2_]

Worksheet_Activate
 
Thanks Rob.

I ended up using the Workbook_Open() instead to call a public
subroutine inside of the Excel Sheet. It's working very nicely.

The combobox gets filled and everything is very pleasant.

I tried to use the Sheets("Sheet1").Activate but that doesn't
force the Activate event to be called. I did get it to fire by
Activating another sheet then Activating the original Sheet1
but that was so SLOPPY. LOL

--
Jim Carlock
http://www.microcosmotalk.com
Feel free to post back to the newsgroup!


"Rob Bovey" wrote in message
...
"Jim Carlock" wrote in message
...
When does the Activate event occur? I've determined that it
occurs when clicking between tabs. It does NOT seem to occur
when the sheet is first loaded though.


Hi Jim,

Yes, the Worksheet Activate event only fires after its workbook has

been
opened when the worksheet transitions from an inactive state to an active
state. This can be the result of clicking on its sheet tab to make it

active
(assuming it wasn't already the active sheet) or unhiding it if it was
hidden. Doing any of these activities from VBA will also fire the event.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *



--
Jim Carlock
http://www.microcosmotalk.com
Feel free to post back to the newsgroup!









All times are GMT +1. The time now is 02:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com