View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
joeu2004 joeu2004 is offline
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.