Problem with Excel 4 macros (I think)

G

Guest

hi,

I have inherited a spreadsheet that was written in 'Excel 97 but when I try
to disable macros it says there are Excel 4 macros that cannot be disabled.
Where would I find them? There are VBA modules but I cannot see any
Application.ExecuteExcel4Macro statements. How are EXcel 4 Macros executed?

Also, the spreadsheets opens another workbook by using a defined name called
Auto_open_logon which in turn calls a procedure in the other workbook. (I had
never seen this before). The other workbook looks and behaves exactly like an
Addin except that IsAddin is FALSE. It has one sheet which you cannot see,
although its visible property is set to xlVisible. If you try to change its
visible propery, you get a runtime error. (it is not protected, I
checked).This workbook contains only forms and modules and an unviewable
worksheet. Am I missing something? Is there an old pre-97 way of making a
workbook an addin? Or is it a Excel 4 macro workbook - if that is possible?
It is driving me mad trying to work out why this workbook is behaving the way
it does.

Can anyone help me?

Thanks,
Chris
 
J

Jim Rech

Is there an old pre-97 way of making a workbook an addin?

Yes. Excel 5 and 95 add-ins were created via Make Add-in on the Tools menu.
There was no VBE and no IsAddin property. Excel 4 macros were put on Excel 4
macro sheets. VB macros with on module sheets.

That said, this file cannot be such an add-in because (1) you said it was
created in Excel 97 and (2) you 'see' something. Add-ins are not visible in
Excel.

If you send it to me I can probably tell you why you're getting the XL4
macro warning.
--
Jim
message | hi,
|
| I have inherited a spreadsheet that was written in 'Excel 97 but when I
try
| to disable macros it says there are Excel 4 macros that cannot be
disabled.
| Where would I find them? There are VBA modules but I cannot see any
| Application.ExecuteExcel4Macro statements. How are EXcel 4 Macros
executed?
|
| Also, the spreadsheets opens another workbook by using a defined name
called
| Auto_open_logon which in turn calls a procedure in the other workbook. (I
had
| never seen this before). The other workbook looks and behaves exactly like
an
| Addin except that IsAddin is FALSE. It has one sheet which you cannot see,
| although its visible property is set to xlVisible. If you try to change
its
| visible propery, you get a runtime error. (it is not protected, I
| checked).This workbook contains only forms and modules and an unviewable
| worksheet. Am I missing something? Is there an old pre-97 way of making a
| workbook an addin? Or is it a Excel 4 macro workbook - if that is
possible?
| It is driving me mad trying to work out why this workbook is behaving the
way
| it does.
|
| Can anyone help me?
|
| Thanks,
| Chris
 
G

Guest

Hi Jim,

thanks for the reply. When I said I see something, I meant that I can see
that there are Forms, modules, etc in the VBE window. In the main Excel
window there is nothing at all - like a proper addin. Also, I may be wrong
that it was created in Excel '97. It could have be done in an earlier
version. Unfortunately, I cannot send it - i'd get fired! If it was created
in an earlier version, then imported in '97 and the VBA modules added, it
would have both types of macro. How would I find the EXcel 4 macros.

Thanks,
Chris
ps could you point me to a resource for using/programming in EXcel 4 -style
 
P

Peter T

Another thought, do you have any Named formulas that include Excel4 macros.

Also, a workbook must always contain at least one visible sheet, even if
it's an addin or a hidden workbook. So indeed you wouldn't be able to change
the visible property of the sole sheet in the workbook. Is the workbook
hidden, like Personal.xls (main menu, Window > Unhide).

Regards,
Peter T
 
G

Guest

hi Peter,
the workbook is very large, so I'm not too sure how I 'm going to find the
named formulas. I did not realise that for an addin at least 1 sheet had to
visible even if it is not really visible. Do you know why the workbook looks
and behaves like an addin but the isaddin property is set to false. Jim Rech
thinks it may be be because it was created in a version prior to '97. If that
is true, how do I find the Excel 4 macros. I have read that they are on macro
sheets, but I cannot see any of them. But I don't know where to look.

Chris
 
J

Jim Rech

I meant that I can see that there are Forms, modules, etc in the VBE
That's the ticket though. Userforms did not exist until Excel 97. So if
this add-in has them it had to be saved in Excel 97 and couldn't be an old
style add-in.

Your job, your call. I wouldn't tell though.<g> Too bad, I like mysteries.

--
Jim
message | Hi Jim,
|
| thanks for the reply. When I said I see something, I meant that I can see
| that there are Forms, modules, etc in the VBE window. In the main Excel
| window there is nothing at all - like a proper addin. Also, I may be wrong
| that it was created in Excel '97. It could have be done in an earlier
| version. Unfortunately, I cannot send it - i'd get fired! If it was
created
| in an earlier version, then imported in '97 and the VBA modules added, it
| would have both types of macro. How would I find the EXcel 4 macros.
|
| Thanks,
| Chris
| ps could you point me to a resource for using/programming in EXcel
4 -style
|
| "Jim Rech" wrote:
|
| > >>Is there an old pre-97 way of making a workbook an addin?
| >
| > Yes. Excel 5 and 95 add-ins were created via Make Add-in on the Tools
menu.
| > There was no VBE and no IsAddin property. Excel 4 macros were put on
Excel 4
| > macro sheets. VB macros with on module sheets.
| >
| > That said, this file cannot be such an add-in because (1) you said it
was
| > created in Excel 97 and (2) you 'see' something. Add-ins are not
visible in
| > Excel.
| >
| > If you send it to me I can probably tell you why you're getting the XL4
| > macro warning.
| > --
| > Jim
| > message | > | hi,
| > |
| > | I have inherited a spreadsheet that was written in 'Excel 97 but when
I
| > try
| > | to disable macros it says there are Excel 4 macros that cannot be
| > disabled.
| > | Where would I find them? There are VBA modules but I cannot see any
| > | Application.ExecuteExcel4Macro statements. How are EXcel 4 Macros
| > executed?
| > |
| > | Also, the spreadsheets opens another workbook by using a defined name
| > called
| > | Auto_open_logon which in turn calls a procedure in the other workbook.
(I
| > had
| > | never seen this before). The other workbook looks and behaves exactly
like
| > an
| > | Addin except that IsAddin is FALSE. It has one sheet which you cannot
see,
| > | although its visible property is set to xlVisible. If you try to
change
| > its
| > | visible propery, you get a runtime error. (it is not protected, I
| > | checked).This workbook contains only forms and modules and an
unviewable
| > | worksheet. Am I missing something? Is there an old pre-97 way of
making a
| > | workbook an addin? Or is it a Excel 4 macro workbook - if that is
| > possible?
| > | It is driving me mad trying to work out why this workbook is behaving
the
| > way
| > | it does.
| > |
| > | Can anyone help me?
| > |
| > | Thanks,
| > | Chris
| >
| >
| >
 
J

Jim Rech

Lightbulb. See if it's a workbook with its windows hidden. Window->Unhide.

--
Jim
message | Hi Jim,
|
| thanks for the reply. When I said I see something, I meant that I can see
| that there are Forms, modules, etc in the VBE window. In the main Excel
| window there is nothing at all - like a proper addin. Also, I may be wrong
| that it was created in Excel '97. It could have be done in an earlier
| version. Unfortunately, I cannot send it - i'd get fired! If it was
created
| in an earlier version, then imported in '97 and the VBA modules added, it
| would have both types of macro. How would I find the EXcel 4 macros.
|
| Thanks,
| Chris
| ps could you point me to a resource for using/programming in EXcel
4 -style
|
| "Jim Rech" wrote:
|
| > >>Is there an old pre-97 way of making a workbook an addin?
| >
| > Yes. Excel 5 and 95 add-ins were created via Make Add-in on the Tools
menu.
| > There was no VBE and no IsAddin property. Excel 4 macros were put on
Excel 4
| > macro sheets. VB macros with on module sheets.
| >
| > That said, this file cannot be such an add-in because (1) you said it
was
| > created in Excel 97 and (2) you 'see' something. Add-ins are not
visible in
| > Excel.
| >
| > If you send it to me I can probably tell you why you're getting the XL4
| > macro warning.
| > --
| > Jim
| > message | > | hi,
| > |
| > | I have inherited a spreadsheet that was written in 'Excel 97 but when
I
| > try
| > | to disable macros it says there are Excel 4 macros that cannot be
| > disabled.
| > | Where would I find them? There are VBA modules but I cannot see any
| > | Application.ExecuteExcel4Macro statements. How are EXcel 4 Macros
| > executed?
| > |
| > | Also, the spreadsheets opens another workbook by using a defined name
| > called
| > | Auto_open_logon which in turn calls a procedure in the other workbook.
(I
| > had
| > | never seen this before). The other workbook looks and behaves exactly
like
| > an
| > | Addin except that IsAddin is FALSE. It has one sheet which you cannot
see,
| > | although its visible property is set to xlVisible. If you try to
change
| > its
| > | visible propery, you get a runtime error. (it is not protected, I
| > | checked).This workbook contains only forms and modules and an
unviewable
| > | worksheet. Am I missing something? Is there an old pre-97 way of
making a
| > | workbook an addin? Or is it a Excel 4 macro workbook - if that is
| > possible?
| > | It is driving me mad trying to work out why this workbook is behaving
the
| > way
| > | it does.
| > |
| > | Can anyone help me?
| > |
| > | Thanks,
| > | Chris
| >
| >
| >
 
P

Peter T

So is the issue resolved, or are you still concerned about Excel 4 macros
you can't find.

Regards,
Peter T
 
G

Guest

I got there too in the end with help from Peter. But could you tell me how to
find Excel 4 macros as I still get a message telling me that I have them and
they cannot be disabled. In fact, a pointer to an online resource would be
nice.

Chris
 
G

Guest

That part is resolved. I have tried unhiding all the sheets via the format
menu, but find nothing. I looped through the sheets collection but found
nothing - but I still get an warning, when disabling macros, that there are
Excel 4 macros that cannot be disabled. Where they are is a different matter.
They do no SEEM to do anything obvious.

Chris
 
J

Jim Rech

Excel 4 macros are on Excel 4 sheets. They look just like regular
worksheets except all the formulas/macro functions on them are visible as
formulas, i.e., they start with "=". If all the sheets in your workbook are
unhidden (Format, Sheets, Unhide) then the warning could be generated by a
defined name as Peter suggested.

I frankly do not remember all the other things that cause this message.
That's why I asked for the workbook. You could clear all the contents on
all the sheets before sending it. It's unlikely that it's visible content
that is causing the problem.

I'm not aware of any online resources for Excel 4 macros.

--
Jim
message |I got there too in the end with help from Peter. But could you tell me how
to
| find Excel 4 macros as I still get a message telling me that I have them
and
| they cannot be disabled. In fact, a pointer to an online resource would be
| nice.
|
| Chris
|
| "Jim Rech" wrote:
|
| > Lightbulb. See if it's a workbook with its windows hidden.
Window->Unhide.
| >
| > --
| > Jim
| > message | > | Hi Jim,
| > |
| > | thanks for the reply. When I said I see something, I meant that I can
see
| > | that there are Forms, modules, etc in the VBE window. In the main
Excel
| > | window there is nothing at all - like a proper addin. Also, I may be
wrong
| > | that it was created in Excel '97. It could have be done in an earlier
| > | version. Unfortunately, I cannot send it - i'd get fired! If it was
| > created
| > | in an earlier version, then imported in '97 and the VBA modules added,
it
| > | would have both types of macro. How would I find the EXcel 4 macros.
| > |
| > | Thanks,
| > | Chris
| > | ps could you point me to a resource for using/programming in EXcel
| > 4 -style
| > |
| > | "Jim Rech" wrote:
| > |
| > | > >>Is there an old pre-97 way of making a workbook an addin?
| > | >
| > | > Yes. Excel 5 and 95 add-ins were created via Make Add-in on the
Tools
| > menu.
| > | > There was no VBE and no IsAddin property. Excel 4 macros were put on
| > Excel 4
| > | > macro sheets. VB macros with on module sheets.
| > | >
| > | > That said, this file cannot be such an add-in because (1) you said
it
| > was
| > | > created in Excel 97 and (2) you 'see' something. Add-ins are not
| > visible in
| > | > Excel.
| > | >
| > | > If you send it to me I can probably tell you why you're getting the
XL4
| > | > macro warning.
| > | > --
| > | > Jim
in
| > | > message | > | > | hi,
| > | > |
| > | > | I have inherited a spreadsheet that was written in 'Excel 97 but
when
| > I
| > | > try
| > | > | to disable macros it says there are Excel 4 macros that cannot be
| > | > disabled.
| > | > | Where would I find them? There are VBA modules but I cannot see
any
| > | > | Application.ExecuteExcel4Macro statements. How are EXcel 4 Macros
| > | > executed?
| > | > |
| > | > | Also, the spreadsheets opens another workbook by using a defined
name
| > | > called
| > | > | Auto_open_logon which in turn calls a procedure in the other
workbook.
| > (I
| > | > had
| > | > | never seen this before). The other workbook looks and behaves
exactly
| > like
| > | > an
| > | > | Addin except that IsAddin is FALSE. It has one sheet which you
cannot
| > see,
| > | > | although its visible property is set to xlVisible. If you try to
| > change
| > | > its
| > | > | visible propery, you get a runtime error. (it is not protected, I
| > | > | checked).This workbook contains only forms and modules and an
| > unviewable
| > | > | worksheet. Am I missing something? Is there an old pre-97 way of
| > making a
| > | > | workbook an addin? Or is it a Excel 4 macro workbook - if that is
| > | > possible?
| > | > | It is driving me mad trying to work out why this workbook is
behaving
| > the
| > | > way
| > | > | it does.
| > | > |
| > | > | Can anyone help me?
| > | > |
| > | > | Thanks,
| > | > | Chris
| > | >
| > | >
| > | >
| >
| >
| >
 
P

Peter T

Perhaps your workbook includes hidden Macro sheets. These are not in the
Worksheets collection, try 'Sheets' and/or look at Format > Sheet > Unhide
(if not greyed).

Regards,
Peter T
 
D

Dave Peterson

You may want to get Jan Karel Pieterse's (with Charles Williams and Matthew
Henson) Name Manager:

You can find it at:
NameManager.Zip from http://www.oaltd.co.uk/mvp

You may help you find any offending name.

And I think that Jan Karel Pieterse (or Harald Staff???) has posted that using
Goal seek that can give this warning, too.
 
G

Guest

Jim,

I have been using Excel '97 when I get these errors. I just tried on EXcel
2003 and I get no EXcel 4 Macro error messages at all. I think it may be a
bug that has been ironed out in later versions. I say this because, after
removing different buttons, (on EXcel '97) the error would disappear, but it
did not matter which buttons, only when I got down to 2 buttons. (I tried
every possible combination - and the erro always went away when I had only 2
buttons left). Also, the fact the I have looked everywhere for EXcel 4 macros
and found nothing point to a bug.

If you really want to see the files, I can email them but I'm moving on.

Chris
 
H

Harlan Grove

Chris Wilkinson said:
the workbook is very large, so I'm not too sure how I 'm going to
find the named formulas. . . .

Create a new workbook, insert a general module in it, and add the
following macro to it.

Sub foo()
Dim n As Name
For Each n In ActiveWorkbook.Names
If n.Value Like "=*[-+*/^()]*" Then
MsgBox Title:=n.Name & IIf(n.Visible, "", " [hidden]"), _
prompt:=n.Value, Buttons:=vbOKOnly
End If
Next n
End Sub

Then switch to your problem workbook and run this macro. Or download
and install Jan Karel Pieterse's Name Manager add-in.
 
J

Jim Rech

the fact the I have looked everywhere for EXcel 4 macros and found nothing
I agree.

Happy trails!

--
Jim
message | Jim,
|
| I have been using Excel '97 when I get these errors. I just tried on EXcel
| 2003 and I get no EXcel 4 Macro error messages at all. I think it may be a
| bug that has been ironed out in later versions. I say this because, after
| removing different buttons, (on EXcel '97) the error would disappear, but
it
| did not matter which buttons, only when I got down to 2 buttons. (I tried
| every possible combination - and the erro always went away when I had only
2
| buttons left). Also, the fact the I have looked everywhere for EXcel 4
macros
| and found nothing point to a bug.
|
| If you really want to see the files, I can email them but I'm moving on.
|
| Chris
|
| "Jim Rech" wrote:
|
| > Excel 4 macros are on Excel 4 sheets. They look just like regular
| > worksheets except all the formulas/macro functions on them are visible
as
| > formulas, i.e., they start with "=". If all the sheets in your workbook
are
| > unhidden (Format, Sheets, Unhide) then the warning could be generated by
a
| > defined name as Peter suggested.
| >
| > I frankly do not remember all the other things that cause this message.
| > That's why I asked for the workbook. You could clear all the contents
on
| > all the sheets before sending it. It's unlikely that it's visible
content
| > that is causing the problem.
| >
| > I'm not aware of any online resources for Excel 4 macros.
| >
| > --
| > Jim
| > message | > |I got there too in the end with help from Peter. But could you tell me
how
| > to
| > | find Excel 4 macros as I still get a message telling me that I have
them
| > and
| > | they cannot be disabled. In fact, a pointer to an online resource
would be
| > | nice.
| > |
| > | Chris
| > |
| > | "Jim Rech" wrote:
| > |
| > | > Lightbulb. See if it's a workbook with its windows hidden.
| > Window->Unhide.
| > | >
| > | > --
| > | > Jim
in
| > | > message | > | > | Hi Jim,
| > | > |
| > | > | thanks for the reply. When I said I see something, I meant that I
can
| > see
| > | > | that there are Forms, modules, etc in the VBE window. In the main
| > Excel
| > | > | window there is nothing at all - like a proper addin. Also, I may
be
| > wrong
| > | > | that it was created in Excel '97. It could have be done in an
earlier
| > | > | version. Unfortunately, I cannot send it - i'd get fired! If it
was
| > | > created
| > | > | in an earlier version, then imported in '97 and the VBA modules
added,
| > it
| > | > | would have both types of macro. How would I find the EXcel 4
macros.
| > | > |
| > | > | Thanks,
| > | > | Chris
| > | > | ps could you point me to a resource for using/programming in EXcel
| > | > 4 -style
| > | > |
| > | > | "Jim Rech" wrote:
| > | > |
| > | > | > >>Is there an old pre-97 way of making a workbook an addin?
| > | > | >
| > | > | > Yes. Excel 5 and 95 add-ins were created via Make Add-in on the
| > Tools
| > | > menu.
| > | > | > There was no VBE and no IsAddin property. Excel 4 macros were
put on
| > | > Excel 4
| > | > | > macro sheets. VB macros with on module sheets.
| > | > | >
| > | > | > That said, this file cannot be such an add-in because (1) you
said
| > it
| > | > was
| > | > | > created in Excel 97 and (2) you 'see' something. Add-ins are
not
| > | > visible in
| > | > | > Excel.
| > | > | >
| > | > | > If you send it to me I can probably tell you why you're getting
the
| > XL4
| > | > | > macro warning.
| > | > | > --
| > | > | > Jim
| > | > | > "Chris Wilkinson" <[email protected]>
wrote
| > in
| > | > | > message
| > | > | > | hi,
| > | > | > |
| > | > | > | I have inherited a spreadsheet that was written in 'Excel 97
but
| > when
| > | > I
| > | > | > try
| > | > | > | to disable macros it says there are Excel 4 macros that cannot
be
| > | > | > disabled.
| > | > | > | Where would I find them? There are VBA modules but I cannot
see
| > any
| > | > | > | Application.ExecuteExcel4Macro statements. How are EXcel 4
Macros
| > | > | > executed?
| > | > | > |
| > | > | > | Also, the spreadsheets opens another workbook by using a
defined
| > name
| > | > | > called
| > | > | > | Auto_open_logon which in turn calls a procedure in the other
| > workbook.
| > | > (I
| > | > | > had
| > | > | > | never seen this before). The other workbook looks and behaves
| > exactly
| > | > like
| > | > | > an
| > | > | > | Addin except that IsAddin is FALSE. It has one sheet which you
| > cannot
| > | > see,
| > | > | > | although its visible property is set to xlVisible. If you try
to
| > | > change
| > | > | > its
| > | > | > | visible propery, you get a runtime error. (it is not
protected, I
| > | > | > | checked).This workbook contains only forms and modules and an
| > | > unviewable
| > | > | > | worksheet. Am I missing something? Is there an old pre-97 way
of
| > | > making a
| > | > | > | workbook an addin? Or is it a Excel 4 macro workbook - if that
is
| > | > | > possible?
| > | > | > | It is driving me mad trying to work out why this workbook is
| > behaving
| > | > the
| > | > | > way
| > | > | > | it does.
| > | > | > |
| > | > | > | Can anyone help me?
| > | > | > |
| > | > | > | Thanks,
| > | > | > | Chris
| > | > | >
| > | > | >
| > | > | >
| > | >
| > | >
| > | >
| >
| >
| >
 
P

Peter T

Didn't notice you had already answered that question.

I was intrigued as to why you only get the Excel4macro warning in XL97. Bit
of a long shot - Hidden Name Space (access disabled in later versions).

In the VBA code, can you relate anything to this page -

http://www.cpearson.com/excel/hidden.htm

Regards,
Peter T
 
J

jkpieterse

Hi Chris,
I have been using Excel '97 when I get these errors. I just tried on EXcel
2003 and I get no EXcel 4 Macro error messages at all. I think it may be a
bug that has been ironed out in later versions. I say this because, after
removing different buttons, (on EXcel '97) the error would disappear, but it
did not matter which buttons, only when I got down to 2 buttons. (I tried
every possible combination - and the erro always went away when I had only 2
buttons left). Also, the fact the I have looked everywhere for EXcel 4 macros
and found nothing point to a bug.

Not necessarily, I think the behaviour of Excel 2003 has changed with
respect to this warning.
I strongly suspect a defined name is causing your message.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top