AutoRun a Macro in Excel based on sheet name
Closed
DebP
-
Apr 2, 2012 at 07:34 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Apr 4, 2012 at 06:08 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Apr 4, 2012 at 06:08 PM
Related:
- AutoRun a Macro in Excel based on sheet name
- Mark sheet in excel - Guide
- Excel macro to create new sheet based on value in cells - Guide
- How to open excel sheet in notepad++ - Guide
- Sheet right to left in google sheet - Guide
- How to screenshot excel sheet - Guide
1 response
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Apr 2, 2012 at 06:23 PM
Apr 2, 2012 at 06:23 PM
not sure what exactly was question, but how about in same auto_open you have a bunch of if statement that can execute the macro you want
Apr 3, 2012 at 05:44 AM
Apr 3, 2012 at 06:20 AM
1. You have a personal.xls
2. you have some excel workbook that has one sheet in it with a certain name on it.
3. when a user open that excel workbook, you want some specific macro to run from personal.xls and which macro would be run would be based on the name of the sheet in workbook that was created by some other application
is that so ?
Apr 3, 2012 at 08:16 AM
2. I have an outside application which generates reports in Excel. The outside app allows me to name the worksheet so I name it with the shortcut key of the macro for ease of use.
3. I would like to have the macro automatically run when the report comes into Excel without user input.
I appreciate any assistance you can provide -- I know I have been unclear -- If there is anyway some sample code I could work with could be provided, that would be wonderful. Thanks again.
Apr 3, 2012 at 05:58 PM
Private Sub Workbook_Open()
Select Case (ActiveSheet.Name)
Case Is = "abc"
Call macroABC
Case Is = "xyz"
Call macroXYZ
End Select
End Sub
Apr 3, 2012 at 06:01 PM