Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quick Excel Macro warning question

Status
Not open for further replies.

westma

Technical User
Jul 16, 2003
74
US
I have a workbook which has no macros associated with it, but every time I open it, the warning about macros and enabling/disabling them appears. Is there a way to fix this. Thanks.
 


Hi,

alt+F11 toggles to the VB Editor.

In the Project Explorer, do you see a Module?

If so, Delete the Module.

Skip,

[glasses] [red]Be Advised![/red]
The band of elderly oriental musicians, known as Ground Cover, is, in reality...
Asian Jasmine![tongue]
 
This worked, but my question has become more complex. I have a macro that saves my active workbook, which is a template file, to a specified directory with a different filename. Is it possible to make it so that the saved file then has no macros with it (maybe the modules are deleted in this new file)? The code is as follows:

ChDir "\\Dir\Files\Newname"

Dim jobname
jobname = Range("A13").Text

ActiveWorkbook.SaveAs _
Filename:="\\Dir\Files\Newname\" & jobname, _
Password:="", _
WriteResPassword:="", _
ReadOnlyRecommended:=False, _
CreateBackup:=False
 


This question has been answered in another forum. Do a SEARCH.

Skip,

[glasses] [red]Be Advised![/red]
The band of elderly oriental musicians, known as Ground Cover, is, in reality...
Asian Jasmine![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top