Saving problem.

Krondor

New Member
Joined
Feb 7, 2005
Messages
11
Columns("A:G").Select
Selection.Copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("A5").Select
Application.CutCopyMode = False
ActiveWorkbook.SaveAs Filename:="A:\BSUoSDD.csv", FileFormat:=xlCSV, _
CreateBackup:=False
ActiveWorkbook.Close
Sheets("Macro Buttons").Select

In the above macro above it makes a new sheet to copy to and save. But it hangs asking if i want to save the sheet that been created when i want to close it any one know a fix or better way.

Thanks in advance
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Hi, Krondor,

WELCOME to the Board! ! !

Make it
ActiveWorkbook.Close Save = True
or just ActiveWorkbook.Close True

kind regards,
Erik
 
Upvote 0
Hi Krondor,

Put
Application.DisplayAlerts = False
at the start of your macro and it will also eliminate similar problems with other code e.g protect

Regards,

Peter
 
Upvote 0
Put
Application.DisplayAlerts = False
at the start of your macro and it will also eliminate similar problems with other code e.g protect

But be careful for the use of this item!
In your code you can delete pages, overwrite files, ... without any warning !!

kind regards,
Erik
 
Upvote 0

Forum statistics

Threads
1,203,101
Messages
6,053,536
Members
444,670
Latest member
laurenmjones1111

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