Hello
This macro should save the contents of the first four columns of the 'Monitor Types' worksheet to a .csv file as the spreadsheet closes.
But it's not. The code works when I step through with F8 so it's not a syntax issue as such.
What have I got wrong?
JJ
[small][purple]Variables won't. Constants aren't[/purple][/small]
This macro should save the contents of the first four columns of the 'Monitor Types' worksheet to a .csv file as the spreadsheet closes.
But it's not. The code works when I step through with F8 so it's not a syntax issue as such.
What have I got wrong?
Code:
Sub AutoClose()
'
' SaveMonitorsList Macro
' Macro recorded 02/01/2007 by Jeff Jeffery
'
'
Application.ScreenUpdating = False
MsgBox ("Saving list of monitors")
Sheets("Monitor Types").Select
Columns("A:D").Copy
Workbooks.Add
ActiveSheet.Paste
Application.CutCopyMode = False
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:="\\bldgb005mcl30\programs\London Local\Inventory\MonitorTypes.csv" _
, FileFormat:=xlCSV, CreateBackup:=False
ActiveWindow.Close
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
JJ
[small][purple]Variables won't. Constants aren't[/purple][/small]