I am getting an error with the application.quit that is driving me nuts.
what I am doing is opening a data dump that I got from a screen capture and copying the data I want into a template. I then sort it and test to make sure there is something in the file otherwise I quit. This is where I keep getting a type mismatch error.
Can you help.
here is a snippet of the code:
Windows("Tellabs template.xls"
.Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Windows("DCCS.cap"
.Activate
Application.DisplayAlerts = False
ActiveWorkbook.Close
Cells.Select
Selection.Sort Key1:=Range("A1"
, Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
If Range("A1"
.Value = Empty Then
Application.Quit
End If
Any help as to why I keep getting the error would be appreciated.
To go where no programmer has gone before.
what I am doing is opening a data dump that I got from a screen capture and copying the data I want into a template. I then sort it and test to make sure there is something in the file otherwise I quit. This is where I keep getting a type mismatch error.
Can you help.
here is a snippet of the code:
Windows("Tellabs template.xls"
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Windows("DCCS.cap"
Application.DisplayAlerts = False
ActiveWorkbook.Close
Cells.Select
Selection.Sort Key1:=Range("A1"
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
If Range("A1"
Application.Quit
End If
Any help as to why I keep getting the error would be appreciated.
To go where no programmer has gone before.