Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hidden? macros
I've been having problems with a spreadsheet that asks to
update links and enable/disable macro's when spreadsheet is open. I didn't think there was any of either. I used findlink.xla (good program) and found a dozen links from old files that must have been used before way out in extended ranges. I deleted them all and solved that problem but can't find any way to tackle the macros. They don't appear when you go to Macro's but I can see them in the code in Visual Basic Editor - View code. I delete them (under Worksheet)but it keeps jumping back to General and when I go back to Worksheet, they are still there. Obviously, I'm missing something. Can someone give me a little guidance here? Thanks, Steve |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hidden? macros
Are the macros inside Module sheets or on sheets that emulate the worksheet
names (or in an object called ThisWorkbook)? If the former, then right-Click the module and choose Remove 'ModuleName' and say No to the Export prompt. If the 2nd, select all of the text in the code pane and press delete. Do NOT use the Drop-Down that has worksheet in it. Choosing "Worksheet" on that dropdown causes Excel to create a special type of macro (probably called Worksheet_SelectionChange). ________________________ Robert Rosenberg R-COR Consulting Services Microsoft MVP - Excel "Steve" wrote in message ... I've been having problems with a spreadsheet that asks to update links and enable/disable macro's when spreadsheet is open. I didn't think there was any of either. I used findlink.xla (good program) and found a dozen links from old files that must have been used before way out in extended ranges. I deleted them all and solved that problem but can't find any way to tackle the macros. They don't appear when you go to Macro's but I can see them in the code in Visual Basic Editor - View code. I delete them (under Worksheet)but it keeps jumping back to General and when I go back to Worksheet, they are still there. Obviously, I'm missing something. Can someone give me a little guidance here? Thanks, Steve |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hidden? macros
What I thought I indentified as a user created macro in
Visual Basic Editor may actually just be the normal info created from opening Excel. When I'm on a sheet and click the View Code button, there are two pull down boxes which say General and Declarations. If I highlight what I see: Private Sub Worksheet_Deactivate() End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) End Sub The pulldowns immediately change to Worksheet and Selection Change. I have Activate,BeforeDoubleClick, BeforeRightClick,Calculate,Activate,Change,Deactiv ate,Follo wHyperlink,SelectionChange in the right pulldown of Worksheet and they all have info in them. I was assuming this was possibly the user created macros from an old file. Right clicking on any of these doesn't give me a 'Remove Module name' option so I'm thinking my macro is elsewhere. What types of macros could be in the workbook but wouldn't have a Macro name show up when I do Tools/Macros? Doesn't there have to be a macro somewhere since Excel asks to enable/disable macros when I open this file? Thanks for your help, I usually can slog through this myself. Steve -----Original Message----- Are the macros inside Module sheets or on sheets that emulate the worksheet names (or in an object called ThisWorkbook)? If the former, then right-Click the module and choose Remove 'ModuleName' and say No to the Export prompt. If the 2nd, select all of the text in the code pane and press delete. Do NOT use the Drop-Down that has worksheet in it. Choosing "Worksheet" on that dropdown causes Excel to create a special type of macro (probably called Worksheet_SelectionChange). ________________________ Robert Rosenberg R-COR Consulting Services Microsoft MVP - Excel "Steve" wrote in message ... I've been having problems with a spreadsheet that asks to update links and enable/disable macro's when spreadsheet is open. I didn't think there was any of either. I used findlink.xla (good program) and found a dozen links from old files that must have been used before way out in extended ranges. I deleted them all and solved that problem but can't find any way to tackle the macros. They don't appear when you go to Macro's but I can see them in the code in Visual Basic Editor - View code. I delete them (under Worksheet)but it keeps jumping back to General and when I go back to Worksheet, they are still there. Obviously, I'm missing something. Can someone give me a little guidance here? Thanks, Steve . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hidden? macros
What you are seeing are the events the are defined for a worksheet. If you
want to define code to run when this event occurs, then you would select if from the dropdown as you have done, and the procedure would be entered in the worksheet module. You would then add the code you want to run in those declarations. they aren't left over from someone else. General code, not related to events, should be put in a general module. In the VBE, insert =Module. -- Regards, Tom Ogilvy Steve wrote in message ... What I thought I indentified as a user created macro in Visual Basic Editor may actually just be the normal info created from opening Excel. When I'm on a sheet and click the View Code button, there are two pull down boxes which say General and Declarations. If I highlight what I see: Private Sub Worksheet_Deactivate() End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) End Sub The pulldowns immediately change to Worksheet and Selection Change. I have Activate,BeforeDoubleClick, BeforeRightClick,Calculate,Activate,Change,Deactiv ate,Follo wHyperlink,SelectionChange in the right pulldown of Worksheet and they all have info in them. I was assuming this was possibly the user created macros from an old file. Right clicking on any of these doesn't give me a 'Remove Module name' option so I'm thinking my macro is elsewhere. What types of macros could be in the workbook but wouldn't have a Macro name show up when I do Tools/Macros? Doesn't there have to be a macro somewhere since Excel asks to enable/disable macros when I open this file? Thanks for your help, I usually can slog through this myself. Steve -----Original Message----- Are the macros inside Module sheets or on sheets that emulate the worksheet names (or in an object called ThisWorkbook)? If the former, then right-Click the module and choose Remove 'ModuleName' and say No to the Export prompt. If the 2nd, select all of the text in the code pane and press delete. Do NOT use the Drop-Down that has worksheet in it. Choosing "Worksheet" on that dropdown causes Excel to create a special type of macro (probably called Worksheet_SelectionChange). ________________________ Robert Rosenberg R-COR Consulting Services Microsoft MVP - Excel "Steve" wrote in message ... I've been having problems with a spreadsheet that asks to update links and enable/disable macro's when spreadsheet is open. I didn't think there was any of either. I used findlink.xla (good program) and found a dozen links from old files that must have been used before way out in extended ranges. I deleted them all and solved that problem but can't find any way to tackle the macros. They don't appear when you go to Macro's but I can see them in the code in Visual Basic Editor - View code. I delete them (under Worksheet)but it keeps jumping back to General and when I go back to Worksheet, they are still there. Obviously, I'm missing something. Can someone give me a little guidance here? Thanks, Steve . |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hidden? macros
<<Right clicking on any of these doesn't give me a 'Remove Module name'
That's correct. In my original reply, I said if the macros were in modules (not worksheets) the Right-Click would have the remove command. Your reply to me makes it clear that the macros are inside the worksheet and are the special event macros. To remove these, you select all of the text and press Delete. ________________________ Robert Rosenberg R-COR Consulting Services Microsoft MVP - Excel "Steve" wrote in message ... What I thought I indentified as a user created macro in Visual Basic Editor may actually just be the normal info created from opening Excel. When I'm on a sheet and click the View Code button, there are two pull down boxes which say General and Declarations. If I highlight what I see: Private Sub Worksheet_Deactivate() End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) End Sub The pulldowns immediately change to Worksheet and Selection Change. I have Activate,BeforeDoubleClick, BeforeRightClick,Calculate,Activate,Change,Deactiv ate,Follo wHyperlink,SelectionChange in the right pulldown of Worksheet and they all have info in them. I was assuming this was possibly the user created macros from an old file. Right clicking on any of these doesn't give me a 'Remove Module name' option so I'm thinking my macro is elsewhere. What types of macros could be in the workbook but wouldn't have a Macro name show up when I do Tools/Macros? Doesn't there have to be a macro somewhere since Excel asks to enable/disable macros when I open this file? Thanks for your help, I usually can slog through this myself. Steve -----Original Message----- Are the macros inside Module sheets or on sheets that emulate the worksheet names (or in an object called ThisWorkbook)? If the former, then right-Click the module and choose Remove 'ModuleName' and say No to the Export prompt. If the 2nd, select all of the text in the code pane and press delete. Do NOT use the Drop-Down that has worksheet in it. Choosing "Worksheet" on that dropdown causes Excel to create a special type of macro (probably called Worksheet_SelectionChange). ________________________ Robert Rosenberg R-COR Consulting Services Microsoft MVP - Excel "Steve" wrote in message ... I've been having problems with a spreadsheet that asks to update links and enable/disable macro's when spreadsheet is open. I didn't think there was any of either. I used findlink.xla (good program) and found a dozen links from old files that must have been used before way out in extended ranges. I deleted them all and solved that problem but can't find any way to tackle the macros. They don't appear when you go to Macro's but I can see them in the code in Visual Basic Editor - View code. I delete them (under Worksheet)but it keeps jumping back to General and when I go back to Worksheet, they are still there. Obviously, I'm missing something. Can someone give me a little guidance here? Thanks, Steve . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
2007 Worksheet, Hidden Columns, .CSV Format Saves Hidden Column Da | Excel Discussion (Misc queries) | |||
Copy and Paste with hidden columns remaining hidden | Excel Discussion (Misc queries) | |||
How do I detect hidden worksheets or hidden data on a worksheet? | Excel Discussion (Misc queries) | |||
Unhide Worksheets (hidden via macros) | Excel Discussion (Misc queries) | |||
excel macros truncating tabs for hidden columns. | Excel Discussion (Misc queries) |