If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
macro warning
I have a workbook that consists of 15 worksheets. One for each
month and then a summary page for the year plus a couple of worksheets containing charts. Every time I open it I'm prompted that the workbook contains macros. I haven't created any macros. I go to toolsmacros and bring up the window no macros are shown. Anybody have any ideas why this is happening? Not really a show stopper but rather irritating. gls858 |
#2
|
|||
|
|||
One possibility is that you need to delete any empty modules that may have
housed macros. Hit ALT+F11 and this will open the VBE (Visual Basic Editor) Top left you will hopefully see an explorer style pane. Within this pane you need to search for your workbook's name, and when you find it you may need to click on the + to expand it. Within that you should see the following:- VBAProject(Your_Filename) Microsoft Excel Objects Sheet1(Sheet1) Sheet2(Sheet2) Sheet3(Sheet3) ThisWorkbook Modules Module1 Module2 etc etc (You may have just 1 of these) If you have named your sheets then those names will appear in the brackets above as opposed to what you see at the moment in my note. Right click on the modules and select remove. When prompted with a question re exporting, just hit no. Then hit File / Close and return to Microsoft Excel and save the file. -- Regards Ken....................... Microsoft MVP - Excel Sys Spec - Win XP Pro / XL 97/00/02/03 ---------------------------------------------------------------------------- It's easier to beg forgiveness than ask permission :-) ---------------------------------------------------------------------------- "gls858" wrote in message ... I have a workbook that consists of 15 worksheets. One for each month and then a summary page for the year plus a couple of worksheets containing charts. Every time I open it I'm prompted that the workbook contains macros. I haven't created any macros. I go to toolsmacros and bring up the window no macros are shown. Anybody have any ideas why this is happening? Not really a show stopper but rather irritating. gls858 |
#3
|
|||
|
|||
Ken Wright wrote:
One possibility is that you need to delete any empty modules that may have housed macros. Hit ALT+F11 and this will open the VBE (Visual Basic Editor) Top left you will hopefully see an explorer style pane. Within this pane you need to search for your workbook's name, and when you find it you may need to click on the + to expand it. Within that you should see the following:- VBAProject(Your_Filename) Microsoft Excel Objects Sheet1(Sheet1) Sheet2(Sheet2) Sheet3(Sheet3) ThisWorkbook Modules Module1 Module2 etc etc (You may have just 1 of these) If you have named your sheets then those names will appear in the brackets above as opposed to what you see at the moment in my note. Right click on the modules and select remove. When prompted with a question re exporting, just hit no. Then hit File / Close and return to Microsoft Excel and save the file. Ken, thanks for the reply. I did in fact have an empty module. I deleted it and saved the file. I still get the warning. Any other ideas? gls858 |
#5
|
|||
|
|||
Nick Hodge wrote:
gls858 Try here http://www.nickhodge.co.uk/tipstrick...warningremoval Thanks Nick. There was an event code on each workbook. I deleted it and the warning is gone. I know I didn't write any code on these sheets. I wouldn't know how :-) I assume it was something that Excel put in automagically for some reason. Here's the VB. Any idea why it was added? Private Sub Worksheet_SelectionChange(ByVal Target As Range) End Sub gls858 |
#6
|
|||
|
|||
Nothing is put there by MS. It requires the steps you took and then
dropping down the top left dropdown and selecting the 'object' (Worksheet, etc). This then puts the default event code template in ready to enter your code. That's what you have. On it's own that code does nothing. (Except fire the security warning!) -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England HIS "gls858" wrote in message ... Nick Hodge wrote: gls858 Try here http://www.nickhodge.co.uk/tipstrick...warningremoval Thanks Nick. There was an event code on each workbook. I deleted it and the warning is gone. I know I didn't write any code on these sheets. I wouldn't know how :-) I assume it was something that Excel put in automagically for some reason. Here's the VB. Any idea why it was added? Private Sub Worksheet_SelectionChange(ByVal Target As Range) End Sub gls858 |
#7
|
|||
|
|||
gls
Debra Dalgleish has info and instructions here......... http://www.contextures.on.ca/xlfaqMac.html#NoMacros Gord Dibben Excel MVP On Wed, 16 Feb 2005 13:27:41 -0600, gls858 wrote: I have a workbook that consists of 15 worksheets. One for each month and then a summary page for the year plus a couple of worksheets containing charts. Every time I open it I'm prompted that the workbook contains macros. I haven't created any macros. I go to toolsmacros and bring up the window no macros are shown. Anybody have any ideas why this is happening? Not really a show stopper but rather irritating. gls858 |
#8
|
|||
|
|||
Gord Dibben wrote:
gls Debra Dalgleish has info and instructions here......... http://www.contextures.on.ca/xlfaqMac.html#NoMacros Gord Dibben Excel MVP On Wed, 16 Feb 2005 13:27:41 -0600, gls858 wrote: I have a workbook that consists of 15 worksheets. One for each month and then a summary page for the year plus a couple of worksheets containing charts. Every time I open it I'm prompted that the workbook contains macros. I haven't created any macros. I go to toolsmacros and bring up the window no macros are shown. Anybody have any ideas why this is happening? Not really a show stopper but rather irritating. gls858 Thanks Gord. Got it sorted. Looks like it must be a fairly common problem. gls858 |
#9
|
|||
|
|||
Nick Hodge wrote:
Nothing is put there by MS. It requires the steps you took and then dropping down the top left dropdown and selecting the 'object' (Worksheet, etc). This then puts the default event code template in ready to enter your code. That's what you have. On it's own that code does nothing. (Except fire the security warning!) Can't imagine who would have done it. My end users wouldn't have a clue. The weird thing is that it was on every sheet. No matter, got it fixed now. Thanks, gls858 |
#10
|
|||
|
|||
If it was on every sheet then chances are that during the design stage
somebody was looking at the original sheet in the VBE before all the other sheets were copied from that one. Just clicking on the dropdown arrow in the VBE would generate that code, albeit by itself it does absolutely nothing. Copying the sheet would then also copy the code etc etc. -- Regards Ken....................... Microsoft MVP - Excel Sys Spec - Win XP Pro / XL 97/00/02/03 ---------------------------------------------------------------------------- It's easier to beg forgiveness than ask permission :-) ---------------------------------------------------------------------------- "gls858" wrote in message ... Nick Hodge wrote: Nothing is put there by MS. It requires the steps you took and then dropping down the top left dropdown and selecting the 'object' (Worksheet, etc). This then puts the default event code template in ready to enter your code. That's what you have. On it's own that code does nothing. (Except fire the security warning!) Can't imagine who would have done it. My end users wouldn't have a clue. The weird thing is that it was on every sheet. No matter, got it fixed now. Thanks, gls858 |
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Date macro | Hiking | General Discussion | 9 | February 3rd, 2005 12:40 AM |
Macro warning box opens twice | BP | General Discussion | 9 | October 1st, 2004 09:47 PM |
HELP!! I can't find any macros but get the macro warning | excelnovice | General Discussions | 7 | June 24th, 2004 05:50 PM |
word error | mac | General Discussions | 1 | May 6th, 2004 08:14 AM |
Macro pop up warning | brian | Worksheet Functions | 2 | November 6th, 2003 09:54 PM |