Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Hangs
I have the macro below which runs as expected first time through. The
seconD time it hangs on the line: Application.Dialogs(xlDialogSendMail).Show Sub SaveToPOLOG() Dim WBtemp As Workbook Dim strFileName As String Application.EnableEvents = False Application.DisplayAlerts = False strFileName = Range("D6").Value & " - " & Range("D36").Value & ".xls" ActiveSheet.Copy ActiveSheet.Name = "PO " & Range("D6").Value ActiveWorkbook.SaveAs Filename:=("C:\Documents and Settings\GregR\My documents\POs\") & _ strFileName ActiveWorkbook.SaveAs Filename:=("G:\IS\ISFinancials\Purchase Orders\POs\") & _ strFileName Set WBtemp = ActiveWorkbook ActiveWorkbook.SaveAs Filename:="C:\Temp\PO " & Range("D6").Value & ".xls" On Error Resume Next Application.Dialogs(xlDialogSendMail).Show 'HANGS HERE" On Error GoTo 0 WBtemp.Close SaveChanges:=False Kill "C:\Temp\PO*" Application.EnableEvents = True Application.DisplayAlerts = True End Sub Any help appreciated. TIA Greg |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro hangs up often but sometimes works fine | Excel Worksheet Functions | |||
Excel macro convert to VBA - doesn't work, hangs on Range("Q35").Select | Excel Programming | |||
VBA Hangs | Excel Programming | |||
Macro hangs my excel (not responding) | Excel Programming |