Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need help with Excel VB
Hi, is there some macro command in Excel VB with is triggered when a
given worksheet is opened? If so what's the syntax? Many thanks in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need help with Excel VB
There is a workbook open event in which any code can be triggered when the
workbook is opened. Right click on the Excel icon next to the File menu - View code - Select Workbook in the drop down menu containing General. -- Damon Longworth 2007 East Coast Excel / Access User Conference April 18-20, 2007 - Providing Microsoft Excel training and Microsoft Excel Classes Atlantic City, New Jersey www.ExcelUserConference.com/ECEUC.html wrote in message oups.com... Hi, is there some macro command in Excel VB with is triggered when a given worksheet is opened? If so what's the syntax? Many thanks in advance. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need help with Excel VB
Yes there is and it is called an event.
Right-click the sheet, select view code and insert something like: Private Sub Worksheet_Activate() MsgBox ("Hello world") End Sub Per Erik wrote: Hi, is there some macro command in Excel VB with is triggered when a given worksheet is opened? If so what's the syntax? Many thanks in advance. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need help with Excel VB
Just some supplementary information:
A useful overview of events is available at Chip Pearon's site: http://www.cpearson.com/excel/events.htm and application level events http://www.cpearson.com/excel/appevent.htm -- Regards, Tom Ogilvy "Damon Longworth" wrote in message ... There is a workbook open event in which any code can be triggered when the workbook is opened. Right click on the Excel icon next to the File menu - View code - Select Workbook in the drop down menu containing General. -- Damon Longworth 2007 East Coast Excel / Access User Conference April 18-20, 2007 - Providing Microsoft Excel training and Microsoft Excel Classes Atlantic City, New Jersey www.ExcelUserConference.com/ECEUC.html wrote in message oups.com... Hi, is there some macro command in Excel VB with is triggered when a given worksheet is opened? If so what's the syntax? Many thanks in advance. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need help with Excel VB
Private Sub Worksheet_Activate()
'do your stuff End Sub Gord Dibben MS Excel MVP On 17 Feb 2007 11:41:19 -0800, wrote: Hi, is there some macro command in Excel VB with is triggered when a given worksheet is opened? If so what's the syntax? Many thanks in advance. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need help with Excel VB
On Feb 17, 2:15 pm, "Tom Ogilvy" wrote:
Just some supplementary information: A useful overview of events is available at Chip Pearon's site: http://www.cpearson.com/excel/events.htm and application level eventshttp://www.cpearson.com/excel/appevent.htm -- Regards, Tom Ogilvy "Damon Longworth" wrote in message ... There is a workbook open event in which any code can be triggered when the workbook is opened. Right click on the Excel icon next to the File menu - View code - Select Workbook in the drop down menu containing General. -- Damon Longworth 2007 East Coast Excel / Access User Conference April 18-20, 2007 - Providing Microsoft Excel training and Microsoft Excel Classes Atlantic City, New Jersey www.ExcelUserConference.com/ECEUC.html wrote in message roups.com... Hi, is there some macro command in Excel VB with is triggered when a given worksheet is opened? If so what's the syntax? Many thanks in advance.- Hide quoted text - - Show quoted text - Many thanks to you and everyone else who replied. Very useful stuff. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|