A series Macro Examples

Activate Event

Activate event occur when workbook, worksheet, chart sheet or embedded chart is activated. Suppose you have worksheet with more than one pivot tables and every time you want you go to the worksheet, data to be refreshed. The below given code will help you to accomplish the task.


Private Sub Worksheet_Activate()
Dim Intcount as interger
For intcount = 1 to Activesheet.PivotTables.count
Next Intcount
End Sub

October 9, 2011
© copyright www.excelcrazy.com. All rights reserved. Design and Development by www.creativebrainweb.com