Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Macro Warning in File w/o Macros?

Hello -

I have the security level of Excel set to Medium so that it asks me
about enabling macros when I open a file that contains macros.

The strange thing is that I did a "Save as..." and then used the
following commands to strip out all the code:

Set VBCodeModule =
ActiveWorkbook.VBProject.VBComponents("Sheet2").Co deModule

With VBCodeModule
lStartLine = 1
lHowManyLines = .CountOfLines

.DeleteLines lStartLine, lHowManyLines
End With

So there shouldn't be any more macro code in that spreadsheet but every
time I open the file Excel asks me about whether I want to enable
macros?

How can I turn that off?

Thanks,
Joe

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Macro Warning in File w/o Macros?

Hello -

Unfortunately the code was in Sheet2 of that spreadsheet and I cannot
delete that.

Thanks,
Joe

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Macro Warning in File w/o Macros?

go to each such module and do Ctrl+A, then hit delete

Then save the file.

--
Regards,
Tom Ogilvy


"Joe HM" wrote in message
ups.com...
Hello -

Unfortunately the code was in Sheet2 of that spreadsheet and I cannot
delete that.

Thanks,
Joe



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Macro Warning in File w/o Macros?

Hello -

That code works great but for some reason I still get the message. I
did some debugging and it seems that as soon as I do a
ActiveWorkbook.SaveAs Filename:="Dummy.xls", FileFormat:=xlNormal
after stripping out all the code it does something to the workbook to
make it think that it contains macros.

Any idea?

Thanks,
Joe

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
Macro warning despite no macros in document Stuart Excel Discussion (Misc queries) 1 October 22nd 09 12:06 AM
Macro warning even though macros have been removed. Stu Excel Discussion (Misc queries) 2 January 3rd 07 03:25 PM
macro warning - but no macros GJR3599 Excel Discussion (Misc queries) 1 April 13th 05 08:15 PM
Macro warning when no macros Allison Excel Programming 8 October 22nd 04 11:26 PM
Macro warning when no macros in workbook BillS[_2_] Excel Programming 15 October 25th 03 01:29 PM


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