Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
gls858
 
Posts: n/a
Default 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   Report Post  
Ken Wright
 
Posts: n/a
Default

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   Report Post  
gls858
 
Posts: n/a
Default

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   Report Post  
gls858
 
Posts: n/a
Default

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   Report Post  
Nick Hodge
 
Posts: n/a
Default

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   Report Post  
Gord Dibben
 
Posts: n/a
Default

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   Report Post  
gls858
 
Posts: n/a
Default

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   Report Post  
gls858
 
Posts: n/a
Default

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   Report Post  
Ken Wright
 
Posts: n/a
Default

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





  #11   Report Post  
gls858
 
Posts: n/a
Default

Ken Wright wrote:
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.

Thanks Ken. I built the workbook in 2000 and we simply copy it
over each year to a new workbook and clear the data. It's
possible that I was poking around in the VBE. Not sure WHY
I would have been doing it because I don't know VB at all.
But then, that's never stopped me before :-)

gls858
  #12   Report Post  
Ken Wright
 
Posts: n/a
Default

If you've never had the message before then my theory's out the window, but
if it's always been there then my money's on my theory :-)

--
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
...
<snip


  #13   Report Post  
gls858
 
Posts: n/a
Default

Ken Wright wrote:
If you've never had the message before then my theory's out the window, but
if it's always been there then my money's on my theory :-)

My guess is it's always been there. I rarely use this workbook.
My end users have a bad habit of not telling me when something isn't
working exactly as expected. They just click yes or no and go their
merry little way. I always tell them I can't fix it if I don't know it's
broke.

thanks again for the help,
gls858
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date macro Hiking Excel Discussion (Misc queries) 9 February 3rd 05 12:40 AM
disable macro warning kim Excel Discussion (Misc queries) 2 December 30th 04 05:57 PM
Help with macro formula and variable Huge project Excel Worksheet Functions 0 December 28th 04 01:27 AM
Macro and If Statement SATB Excel Discussion (Misc queries) 2 December 3rd 04 04:46 PM
Macro warning window Beema Excel Discussion (Misc queries) 1 December 2nd 04 05:33 PM


All times are GMT +1. The time now is 09:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"