ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to show old macros? (https://www.excelbanter.com/excel-programming/340697-how-show-old-macros.html)

[email protected]

How to show old macros?
 
Hello newsgroup,

I've got an old worksheet from Excel 4.0 with macros in the old speech
before VBA. Is there a possibility to show this old macros? The VB
Editor only shows VBA macros...


Peter


Chip Pearson

How to show old macros?
 
You need to unhide the macro sheet that contains the macros.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



wrote in message
oups.com...
Hello newsgroup,

I've got an old worksheet from Excel 4.0 with macros in the old
speech
before VBA. Is there a possibility to show this old macros? The
VB
Editor only shows VBA macros...


Peter




[email protected]

How to show old macros?
 
Hello Chip,

all sheets are visible. The problem is that the macros are not written
in VBA, but written in XLM.


Chip Pearson

How to show old macros?
 
XLM macros are stored in special worksheets. Use the following
code to make all sheets, including XLM macro sheets, visible.
Then you can delete the sheet.

Sub AAA()
Dim s As Object
For Each s In ThisWorkbook.Sheets
s.Visible = True
Next s
End Sub

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com





wrote in message
ps.com...
Hello Chip,

all sheets are visible. The problem is that the macros are not
written
in VBA, but written in XLM.




[email protected]

How to show old macros?
 
I have used your code, but nothing happens. The numer of sheets remains
equal. There is no sheet with code. I'm using Excel 2002


Tom Ogilvy

How to show old macros?
 
Do you have any separate workbooks with an .xlm extension?

--
Regards,
Tom Ogilvy


wrote in message
oups.com...
I have used your code, but nothing happens. The numer of sheets remains
equal. There is no sheet with code. I'm using Excel 2002




[email protected]

How to show old macros?
 
I have only one xls file. I have put it on my private computer and it
worked too - The macros are within this xls.

It seems that the only possiblity to read this old XLM code is to
install office97, or a later version of MS office!?


Chip Pearson

How to show old macros?
 
You can read XLM code in any version of Excel.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


wrote in message
ups.com...
I have only one xls file. I have put it on my private computer
and it
worked too - The macros are within this xls.

It seems that the only possiblity to read this old XLM code is
to
install office97, or a later version of MS office!?




[email protected]

How to show old macros?
 
But how to show/edit the code? That the macros could be executed is
known. Can you see the whole xlm macro in your VBA Editor? (And edit
them?)


Chip Pearson

How to show old macros?
 
Forget completely about the VBA Editor when it comes to XLM
macros. The VBA Editor has nothing whatsoever to do with XLM
macros. XLM macros are stored on special worksheets called macro
sheets. You edit them on the macro sheet.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

wrote in message
oups.com...
But how to show/edit the code? That the macros could be
executed is
known. Can you see the whole xlm macro in your VBA Editor? (And
edit
them?)




[email protected]

How to show old macros?
 
How to get this macro sheets?
1. I make a double click on the xls file.
2. I enable all macro warnings.
3. I see 6 tables with data. There are no code lines
4. I go to the VBA Editor, execute your code to show all tables, but
nothing more comes visible!?

Where can I edit the xlm macros? Where are theses special worksheets?


Tom Ogilvy

How to show old macros?
 
In a new workbook, right click on a sheet tab and select Insert and then
select MS Excel 4.0 Macro

This is where xl4 macro code would be placed.


In the original workbook,
Are you sure the code is not just protected. Can you expand the workbook
project in the project manager in the vbe - it expands and shows only sheet
entries, no modules.

If you want to send me the file, I will look at it.



--
Regards,
Tom Ogilvy




wrote in message
oups.com...
How to get this macro sheets?
1. I make a double click on the xls file.
2. I enable all macro warnings.
3. I see 6 tables with data. There are no code lines
4. I go to the VBA Editor, execute your code to show all tables, but
nothing more comes visible!?

Where can I edit the xlm macros? Where are theses special worksheets?




[email protected]

How to show old macros?
 
Finally the problem is solved. This VBA macro will show the XLM macros:

Private Sub ShowExcel4MacroSheets
Dim i As Long

For i = 1 To Application.Excel4MacroSheets.Count
Application.Excel4MacroSheets(i).Visible = True
Next i

For i = 1 To Application.Excel4IntlMacroSheets.Count
Application.Excel4IntlMacroSheets(i).Visible = True
Next i
End Sub

Without Toms and Chips help I wouldnt solve this problem. Thanks a lot.
:-))))



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com