Disable Macros while 'save-as'?

bjoydeep

New Member
Joined
Nov 7, 2002
Messages
5
Hi!

I am a newbie to VBA macros. So dont know if its a silly question to ask!
I am open an excel workbook, read data from a csv into it (by a Auto_Open) then do some formatting and then saving it as another xl sheet (original xl sheet is untouched) through a Auto_Close macro.
Now while saving the worksheet-as, I would want it to saved without any of the macros.
Is it possible at all?

This is code for autoclose:
Public Sub Auto_Close()
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:= _
"c:test_jb.xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
' Closes workbook
'Application.Quit
ActiveWorkbook.Close
End Sub

Would appreciate if you could help me in anyway.

Thanks
Joydeep
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,214,985
Messages
6,122,607
Members
449,090
Latest member
vivek chauhan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top