G
Guest
When I run the following code... it crashes my excel and I believe it is
because of the break links command.
any ideas?
Application.Run "'SNW INV PLAIN.xls'!FilterAll"
Sheets("Agencies").Select
Range("a1").Select
Sheets("Corporates").Select
Range("a1").Select
Sheets("Tax Muni's").Select
Range("a1").Select
Sheets("Muni's").Select
Range("a1").Select
Sheets("Agencies").Select
Sheets(Array("Agencies", "Corporates", "Tax Muni's", "Muni's")).Select
Sheets("Agencies").Activate
Sheets(Array("Agencies", "Corporates", "Tax Muni's", "Muni's")).Copy
ActiveWorkbook.BreakLink Name:="S:\Inventory\SNW INV PLAIN.xls", Type:= _
xlExcelLinks
Application.Wait Now + TimeSerial(0, 0, 1)
Sheets("Agencies").Select
ActiveWorkbook.Protect Password:="snwwb", Structure:=True, Windows:=False
sFilename = "S:\Inventory\SNW Offerings " & Format(Now, "yyyy-mm-dd")
ans = MsgBox("Save file as " & sFilename)
If ans = vbOK Then
ActiveWorkbook.SaveAs Filename:=sFilename
End If
because of the break links command.
any ideas?
Application.Run "'SNW INV PLAIN.xls'!FilterAll"
Sheets("Agencies").Select
Range("a1").Select
Sheets("Corporates").Select
Range("a1").Select
Sheets("Tax Muni's").Select
Range("a1").Select
Sheets("Muni's").Select
Range("a1").Select
Sheets("Agencies").Select
Sheets(Array("Agencies", "Corporates", "Tax Muni's", "Muni's")).Select
Sheets("Agencies").Activate
Sheets(Array("Agencies", "Corporates", "Tax Muni's", "Muni's")).Copy
ActiveWorkbook.BreakLink Name:="S:\Inventory\SNW INV PLAIN.xls", Type:= _
xlExcelLinks
Application.Wait Now + TimeSerial(0, 0, 1)
Sheets("Agencies").Select
ActiveWorkbook.Protect Password:="snwwb", Structure:=True, Windows:=False
sFilename = "S:\Inventory\SNW Offerings " & Format(Now, "yyyy-mm-dd")
ans = MsgBox("Save file as " & sFilename)
If ans = vbOK Then
ActiveWorkbook.SaveAs Filename:=sFilename
End If