ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Still Macro Warning w/o Macros ... (https://www.excelbanter.com/excel-programming/326411-still-macro-warning-w-o-macros.html)

Joe HM

Still Macro Warning w/o Macros ...
 
Hello -

Sorry to bug you guys again but I have been using code to strip out any
possible VB code and module from my file. Then I do a SaveAs and close
it.

ActiveWorkbook.SaveAs Filename:="Dummy.xls", FileFormat:=xlNormal
ActiveWorkbook.Close

When I open the file Excel will still prompt me with the macro warning.

So I played with it and added the following lines after the above code
.... essentially re-opening the file and saving it again.

Set lLogFile = Workbooks.Open("Dummy.xls")
lLogFile.Save
lLogFile.Close

For whatever reason this helped and now I don't get the warning anymore
when I open Dummy.xls.

I would rather not do it that way so maybe somebody out there has an
idea what is going on?

Thanks,
Joe


Ed

Still Macro Warning w/o Macros ...
 
From the VBE, check the Modules, Forms, and Class Modules folders. If
there's something there, even if it's blank, Excel will think you have code.
Also check each Worksheet and ThisWorkbook for code. Sorry, but I'm
unfamiliar with LogFile.

Ed
"Joe HM" wrote in message
oups.com...
Hello -

Sorry to bug you guys again but I have been using code to strip out any
possible VB code and module from my file. Then I do a SaveAs and close
it.

ActiveWorkbook.SaveAs Filename:="Dummy.xls", FileFormat:=xlNormal
ActiveWorkbook.Close

When I open the file Excel will still prompt me with the macro warning.

So I played with it and added the following lines after the above code
... essentially re-opening the file and saving it again.

Set lLogFile = Workbooks.Open("Dummy.xls")
lLogFile.Save
lLogFile.Close

For whatever reason this helped and now I don't get the warning anymore
when I open Dummy.xls.

I would rather not do it that way so maybe somebody out there has an
idea what is going on?

Thanks,
Joe




Joe HM

Still Macro Warning w/o Macros ...
 
Hello -

lLogFile is just a dummy name for the workbook I open with .Open(). So
all I do is open the file and save it ... then the warning will not
appear again ... really strange!

Thanks,
Joe



All times are GMT +1. The time now is 05:34 PM.

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