Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]() Can anyone help how to autrun a macro when a worksheet is selected. -- cpmittal ------------------------------------------------------------------------ cpmittal's Profile: http://www.excelforum.com/member.php...o&userid=25641 View this thread: http://www.excelforum.com/showthread...hreadid=390498 |
#2
![]() |
|||
|
|||
![]()
Hi,
This works whenever a change is made within a worksheet, will it do? Go to VBE (Alt + F11). Find the sheet you want to apply this to within Project-VBA Project. Double click the sheet and paste: Private Sub Worksheet_SelectionChange(ByVal Target As Range) YourMacro End Sub Change "YourMacro" to the code you want to run. Regards, A "cpmittal" wrote: Can anyone help how to autrun a macro when a worksheet is selected. -- cpmittal ------------------------------------------------------------------------ cpmittal's Profile: http://www.excelforum.com/member.php...o&userid=25641 View this thread: http://www.excelforum.com/showthread...hreadid=390498 |
#3
![]() |
|||
|
|||
![]()
Us
Private Sub Worksheet_Activate() YourMacro End Sub -- HTH RP (remove nothere from the email address if mailing direct) "aristotle" wrote in message ... Hi, This works whenever a change is made within a worksheet, will it do? Go to VBE (Alt + F11). Find the sheet you want to apply this to within Project-VBA Project. Double click the sheet and paste: Private Sub Worksheet_SelectionChange(ByVal Target As Range) YourMacro End Sub Change "YourMacro" to the code you want to run. Regards, A "cpmittal" wrote: Can anyone help how to autrun a macro when a worksheet is selected. -- cpmittal ------------------------------------------------------------------------ cpmittal's Profile: http://www.excelforum.com/member.php...o&userid=25641 View this thread: http://www.excelforum.com/showthread...hreadid=390498 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Setting up a form to input into selected worksheet | Excel Discussion (Misc queries) | |||
Search/Match between 2 x separate Worksheets and populate result in third worksheet | Excel Discussion (Misc queries) | |||
Turn off hyperlinks in a selected worksheet | Excel Discussion (Misc queries) | |||
can I print selected cells only within a worksheet | New Users to Excel | |||
Executing macro for all worksheet from a different worksheet | New Users to Excel |