I have a macro I would like to run when a partiuclar sheet is selected
in a workbook but cant find where that is covered. I would also like
that same macro to run when the sheet is closed and another sheet is
opened. Is there such a command in Excel. TIA

Signature
moorso
Andy Wiggins - 20 Jun 2005 13:14 GMT
You need an event.
Lookup "SheetActivate Event" in Excel's VBA Help file. Specifically, you
require Worksheet_Activate and Worksheet_Deactivate.

Signature
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy
-
> I have a macro I would like to run when a partiuclar sheet is selected
> in a workbook but cant find where that is covered. I would also like
> that same macro to run when the sheet is closed and another sheet is
> opened. Is there such a command in Excel. TIA
Bob Phillips - 20 Jun 2005 13:36 GMT
See response in .programming.

Signature
HTH
RP
(remove nothere from the email address if mailing direct)
> I have a macro I would like to run when a partiuclar sheet is selected
> in a workbook but cant find where that is covered. I would also like
> that same macro to run when the sheet is closed and another sheet is
> opened. Is there such a command in Excel. TIA