Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I recorded a macro (as a basis for editing, maybe with help here). But
how are you supposed to know where to find the VBA code please? I assumed it would be in PERSONAL.xlsb as a new module, But as you see it's replaced whatever was in Module 8, rather than creating Module 16. https://dl.dropboxusercontent.com/u/...e-Location.jpg What logic or inadvertent setting on my part gets it into Module 8? Also, could I ask a few associated very basic queries please: 1. Is there any way to change 'Module 1' etc to meaningful names? 2. Or search for a macro name? 3. Is there a KB shortcut to stop a macro recording, rather than the four clicks, in my case: Classical Menu Tools Macro Stop Recording 4. With many modules open, as I had here, can I close them all at once instead of individually? -- Terry, East Grinstead, UK |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I recorded a macro (as a basis for editing, maybe with help here).
But how are you supposed to know where to find the VBA code please? I assumed it would be in PERSONAL.xlsb as a new module, But as you see it's replaced whatever was in Module 8, rather than creating Module 16. The Record Macro dialog lets you choose what to name it and which open file to store it in. ThisWorkbook (the active workbook) is the default. https://dl.dropboxusercontent.com/u/...e-Location.jpg What logic or inadvertent setting on my part gets it into Module 8? None! -It increments the next number. Possibly because you gave it the same name as a procedure already existing there in Module8 of the file you chose to store it in via the Record Macro dialog??? Excel will not create another module to store a duplicate procedure in the same file. (Excel prompts to warn you asame name macro already exists in the file and asks if you want to replace it!) Also, could I ask a few associated very basic queries please: 1. Is there any way to change 'Module 1' etc to meaningful names? Open the Properties window in the VBE and edit its 'Name' there. 2. Or search for a macro name? Alt+F8 opens the 'Macros' dialog where you can manage (limited) them from its list. 3. Is there a KB shortcut to stop a macro recording, rather than the four clicks, in my case: Classical Menu Tools Macro Stop Recording When the Record Macro dialog closes the Macro Recorder toolbar floats over the active window so you can click its 'Stop' button when your done the actions you're recording. If you don't dismiss it then you won't have to step through the menus to stop recording! 4. With many modules open, as I had here, can I close them all at once instead of individually? You can just maximize any module's window so you only see the one you've selected (dbl-click) in the Project Explorer pane! -- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
GS wrote:
I recorded a macro (as a basis for editing, maybe with help here). But how are you supposed to know where to find the VBA code please? I assumed it would be in PERSONAL.xlsb as a new module, But as you see it's replaced whatever was in Module 8, rather than creating Module 16. The Record Macro dialog lets you choose what to name it and which open file to store it in. ThisWorkbook (the active workbook) is the default. https://dl.dropboxusercontent.com/u/...e-Location.jpg What logic or inadvertent setting on my part gets it into Module 8? None! -It increments the next number. Possibly because you gave it the same name as a procedure already existing there in Module8 of the file you chose to store it in via the Record Macro dialog??? Excel will not create another module to store a duplicate procedure in the same file. (Excel prompts to warn you asame name macro already exists in the file and asks if you want to replace it!) Also, could I ask a few associated very basic queries please: 1. Is there any way to change 'Module 1' etc to meaningful names? Open the Properties window in the VBE and edit its 'Name' there. 2. Or search for a macro name? Alt+F8 opens the 'Macros' dialog where you can manage (limited) them from its list. 3. Is there a KB shortcut to stop a macro recording, rather than the four clicks, in my case: Classical Menu Tools Macro Stop Recording When the Record Macro dialog closes the Macro Recorder toolbar floats over the active window so you can click its 'Stop' button when your done the actions you're recording. If you don't dismiss it then you won't have to step through the menus to stop recording! 4. With many modules open, as I had here, can I close them all at once instead of individually? You can just maximize any module's window so you only see the one you've selected (dbl-click) in the Project Explorer pane! Thanks Garry, understood. Terry, East Grinstead, UK |
#4
![]() |
|||
|
|||
![]()
When you press RecordMacro, a dialog box opens on which there is a drop down that lets you select what workbook the code is to be put in. It also allows you to specify the name of the about to be recorded macro.
Once you are done recording the macro, if you invoke the RunMacro dialog box, you can select the macro, press Edit and you will be taken to that macro in the VBEditor, which will let you see what module (in the VBProject you selected from the Record Macro dialog) your macro was put in. Quote:
|
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
When you press RecordMacro, a dialog box opens on which there is a
drop down that lets you select what workbook the code is to be put in. It also allows you to specify the name of the about to be recorded macro. Once you are done recording the macro, if you invoke the RunMacro dialog box, you can select the macro, press Edit and you will be taken to that macro in the VBEditor, which will let you see what module (in the VBProject you selected from the Record Macro dialog) your macro was put in. Well stated! -- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks Mike, appreciate the follow-up.
Terry, East Grinstead, UK |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Recorded Macro Works, Code Doesn't | Excel Programming | |||
Improving the code from a recorded macro | Excel Programming | |||
Tidying Recorded Macro Code | Excel Programming | |||
Call recorded macro from VBA code | Excel Programming | |||
looking to simplify a recorded macro with code | Excel Programming |