Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,059
Default Why am I getting 2nd macro security warning?

I have a workbook with a "library" of macros. I open and close it
frequently. Since I have macro security set to "medium", I expect and
get the Security Warning diaglog box that says: "<fileName contains
macros. Macros may contain viruses", with Disable and Enable Macros
buttons.

All of sudden, I am now getting an undesired second dialog box with
the title Microsoft Excel. It says: "This workbook contains one or
more Microsoft Excel 4.0 macros. [....] Do you want to enable these
macros?", with Yes and No buttons.

Why am I now getting this second dialog box? That is, what might have
changed? More to the point, what I can do to get rid of it?

Of several workbooks that I have that contain macros, this is the only
one so far that produces the undesired second warning.

I am using and always have used Office Excel 2003. According to my
book, that is synomous with Excel 11, not Excel 4 (same as "4.0"?).

Recently, I did set my macro security to "very high" during some
experiments; and I might have saved the workbook in that state
inadvertently. But since then, I have set the macro security back to
"medium" and saved the workbook.

I use only some standard add-ins, namely the ATP and Solver. That has
not changed for a long time.

I do not believe I have made any changes to the "library" of macros,
which are in Module1. Recently, I did add some test macros in
Module2. I believe I had reopened the workbook without getting the
extra prompt since I added Module2. But honestly, I cannot be sure.

Nevertheless, when I cut-and-paste all of the macros to Module1 and
Module2 of a new workbook, then close and reopen the new workbook, I
get only the first Security Warning, as I expect. I do not get the
undesired second warning.

Moreover, returning to the "bad" workbook, if I remove Module2, the
second Microsoft Excel warning persists. It fact, it persists even
after I deleted all of the worksheets, which referenced some of the
functions, and added a new blank worksheet. Moreover, the undesired
second warning persists after I delete all unnecessary macros in
Module1. Those were test subroutines.

In summary, nothing I do or undo seems to remedy the problem in the
"bad" workbook. But the same macros copied into a new workbook do not
incur the undesired second warning.

Technically, I have already worked around the problem by cut-and-
pasting the macros to new workbook. But I would still like to
understand the situation so that I will know what to do in the future,
when perhaps the work-around will not be that simple.

Thanks for any insights.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 434
Default Why am I getting 2nd macro security warning?

hi, !

1) it's not clear if you are getting the "second warning":
- "This workbook contains one or more Microsoft Excel 4.0 macros (...)"
immediately after you get the "first warning":
- "<fileName contains macros (...) "
or you get the second warning "in lieu" of the first warning -?-

2) AFAIK the second warning arises (only) if your workbook (the "bad" one ?):
- contains (normal/international) "MacroSheets" type (work)sheets
- and/or IF... (for any reason) excel "attempts" to read/interpret...
(some) cell's content as a macro-function (from the ancient xl4 macro language)

3) you can review/check/... if all of your (work)sheets "has" it's own "class" code module
(in your vba-editor) - macrosheets do not have class modules

if any doubt (or further information)... would you please comment ?
hth,
hector.

__ (snipped OP) __
I have a workbook with a "library" of macros. I open and close it frequently.
Since I have macro security set to "medium", I expect and get the Security Warning diaglog box that says:
"<fileName containsmacros. Macros may contain viruses", with Disable and Enable Macros buttons.

All of sudden, I am now getting an undesired second dialog box with the title Microsoft Excel.
It says: "This workbook contains one or more Microsoft Excel 4.0 macros.
[....] Do you want to enable these macros?", with Yes and No buttons. (...)



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,059
Default Why am I getting 2nd macro security warning?

On Dec 31, 6:22*pm, "Héctor Miguel"
wrote:
1) it's not clear if you are getting the "second warning":
* * - "This workbook contains one or more Microsoft Excel 4.0 macros (...)"
* * immediately after you get the "first warning":
* * - "<fileName contains macros (...) "
* * or you get the second warning "in lieu" of the first warning * *-?-


Thanks for your interest in my problem.

I get the "Excel 4.0 macros" warning in addition to the normal
"Disable/Enable Macros" warning due to the "medium" macro security.
In the original "bad" workbook, the "Disable/Enable Macros" warning
pops up before any of the worksheet contents, as expected. Then the
"Excel 4.0 macros" warning pops up just after the worksheet contents
appear.

2) AFAIK the second warning arises (only) if your workbook (the "bad" one ?):
* * - contains (normal/international) "MacroSheets" type (work)sheets
* * - and/or IF... (for any reason) excel "attempts" to read/interpret...
* * * * (some) cell's content as a macro-function (from the ancient xl4 macro
language)


I'm afraid I do not know what any of that is. But that does not mean
I couldn't stumble into creating those because of something that I did
inadvertently.

A google search did not immediately help me understand this. I
confess I did not read very deeply.

But if you are suggesting that the problem has to do with a worksheet,
wouldn't you expect the problem to go away after I deleted all of the
worksheets (and added a new blank one to avoid closing the workbook
summarily)?

3) you can review/check/... if all of your (work)sheets "has" it's own "class"
code module (in your vba-editor) - macrosheets do not have class modules


I do not understand all that. I do not know what to check. But
perhaps this will be relevant. When I look at the Project Explorer, I
see:

- VBAbinary (binary-BAD.xls)
- Microsoft Excel Objects
Sheet1 (Sheet1)
Sheet2 (Sheet2)
ThisWorkbook
- Modules
Module1
Module2

All of the "MS Excel Objects" are blank. Module1 and Module2 contain
my macros.

This is similar to the new workbook, into which I cut-and-pasted the
contents of Module1 and Module2. When I open the new workbook, I get
only the one expected "Disable/Enable Macros" dialog box.

The only "obvious" Project Explorer differences between the "bad" and
the new workbook is that in the "bad" workbook, I named the project
VBAbinary -- a unique name that permits me to reference in other
workbooks.

Another difference is that the worksheets in the "new" workbook are
all empty, whereas I have formulas in worksheets in the 'bad" workbook
that refer to functions in Module1 and Module2.

But I always had function references in the "bad" workbook, and
previously, they did not cause the additional "Excel 4.0 macros"
dialog box, which I want to avoid.
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 434
Default Why am I getting 2nd macro security warning?

hi, joe !

__ 1 __
I get the "Excel 4.0 macros" warning in addition to the normal "Disable/Enable Macros" warning
due to the "medium" macro security.
In the original "bad" workbook, the "Disable/Enable Macros" warning pops up
before any of the worksheet contents, as expected.
Then the "Excel 4.0 macros" warning pops up just after the worksheet contents appear.


1) apparently your macros are trying to make "calls" to XL-4 macros (in someway/somehow)
perhaps opening (other) workbook/s which contains macrosheets (and/or)
containing references to workbooks/addins/... with (or written in) XL-4 macro-functions language

- previously you commented that your macros makes some calls to ATP & Solver functions (so...)
check in your vba-project for any reference pointing to addins (xla) that could it be from earlier versions

__ 2 __
AFAIK the second warning arises (only) if your workbook (the "bad" one ?):
- contains (normal/international) "MacroSheets" type (work)sheets
- and/or IF... (for any reason) excel "attempts" to read/interpret...
(some) cell's content as a macro-function (from the ancient xl4 macro language)


I'm afraid I do not know what any of that is.
But that does not mean I couldn't stumble into creating those because of something that I did inadvertently.
A google search did not immediately help me understand this.
I confess I did not read very deeply.


2) a macrosheet can easily (and inadvertedly) be added to your workbook with a short-cut key: - {ctrl}+{F11}
an empty macrosheet could be enough to get the "normal" macro warning (the first one) message
if a macrosheet is hidden (suppose xlSheetVeryHidden) can not be "viewed" (even through vba editor)
however, "macros" in macrosheets are "named-ranges" (either as functions or commands)

__ 3__
But if you are suggesting that the problem has to do with a worksheet
wouldn't you expect the problem to go away after I deleted all of the worksheets
(and added a new blank one to avoid closing the workbook summarily)?


3) that's correct, unless... the excel 4 macros comes from any "opening" workbook (by your normal macros)

__ 4 __
All of the "MS Excel Objects" are blank. Module1 and Module2 contain my macros.
This is similar to the new workbook, into which I cut-and-pasted the contents of Module1 and Module2.
When I open the new workbook, I get only the one expected "Disable/Enable Macros" dialog box.
The only "obvious" Project Explorer differences between the "bad" and the new workbook is that in the "bad" workbook
I named the project VBAbinary -- a unique name that permits me to reference in other workbooks.
Another difference is that the worksheets in the "new" workbook are all empty
whereas I have formulas in worksheets in the 'bad" workbook that refer to functions in Module1 and Module2.


4) no comments... that's the way it should be

__ 5 __
But I always had function references in the "bad" workbook, and previously
they did not cause the additional "Excel 4.0 macros" dialog box, which I want to avoid.


5) believe me, the "excel 4 macros warning", there is no way to arise...
IF NO excel 4 macros are to be opened in the excel session (not necessarily in your workbook)
- macrosheets / names
- "opening" workbooks/addins (with either calls to or written in the excel 4 macro language)
- (like) macro-functions (text) in your (macro)sheets cells

if any doubts (or further information)... would you please comment ?
hth,
hector.


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,059
Default Why am I getting 2nd macro security warning?

On Dec 31 2007, 11:58*pm, "Héctor Miguel"
wrote:
however, "macros" in macrosheets are "named-ranges" (either as
functions or commands)


I do not understand that, but that pointed me in the right direction.
Thanks!

Aha! Problem solved!

I had created a named formula of the form =EVALUATE("1+2+3").

When I deleted that, the "Excel 4.0 macro" warning went away(!).

Yup, that's it! When I create a new workbook (no macros, etc) and add
another named formula of the form =EVALUATE("..."), the warning
returns.

I am surprised. Using =EVALUATE() in a named formula has been
recommended before in these newsgroups without any mention of an
additional warning at load time.

Thank you very much for your patient troublingshoot tips.


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,059
Default Why am I getting 2nd macro security warning?

PS....

On Jan 1, 6:06*am, I wrote:
Aha! *Problem solved!

I had created a named formula of the form =EVALUATE("1+2+3").
When I deleted that, the "Excel 4.0 macro" warning went away(!).
[....]
I am surprised. *Using =EVALUATE() in a named formula has been
recommended before in these newsgroups without any mention of an
additional warning at load time.


Setting macro security to "low" eliminates the warning. But that is
unacceptable to me. I set macro security to "medium" de rigueur. The
warning appears to be just a different macro security check that is
not covered (sadly) by simply manually enabling macros in response to
the normal "medium" security warning.

Oh well....
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 434
Default Why am I getting 2nd macro security warning?

hi, joe !

yes !, using =evaluate("...") in named-formulae is one of the ways excel 4 macros waring arises
as evaluate comes from the (ancient) XL-4 macro-functions (for those whom remembers that) language

glad to be in help (and thanks for your feed-back) <vg
regards,
hector.

__ previous posts __
however, "macros" in macrosheets are "named-ranges" (either as functions or commands)


I do not understand that, but that pointed me in the right direction.
Thanks!
Aha! Problem solved!

I had created a named formula of the form =EVALUATE("1+2+3").
When I deleted that, the "Excel 4.0 macro" warning went away(!).

Yup, that's it! When I create a new workbook (no macros, etc)
and add another named formula of the form =EVALUATE("..."), the warning returns.

I am surprised. Using =EVALUATE() in a named formula has been recommended before
in these newsgroups without any mention of an additional warning at load time.

Thank you very much for your patient troublingshoot tips.



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
Why security warning still appear after I delete all macros Wei Kai Excel Worksheet Functions 1 February 8th 07 05:51 AM
macro security warning when no maco in workbook Nuts Excel Discussion (Misc queries) 1 March 28th 06 11:21 AM
How to get the security warning, add myself as trusted publisher Judy Excel Discussion (Misc queries) 1 December 19th 05 05:52 PM
Macro/Security Warning Marc Excel Discussion (Misc queries) 3 May 30th 05 10:06 PM


All times are GMT +1. The time now is 03:08 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"