S
SteveC
I have a macro that runs a filter, copies the results, and pastes it into
another worksheet.
How do I skip to next part of code if the filter results are blank? For
some reason, Excel 2007 crashes when it tries to copy and paste blank filter
results.
This is part of the code that I have now:
Sheets("Screens").Select
Range("B9:FA9").Select
Selection.Copy
Sheets("List").Select
Range("AI6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.Run "ShowAll"
Application.Run "Run_All_Filters"
Range("D13").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Selector").Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
How do I modify this so if D13 is blank and there is nothing to select, it
will skip on to the next part of the code?
Thanks...
another worksheet.
How do I skip to next part of code if the filter results are blank? For
some reason, Excel 2007 crashes when it tries to copy and paste blank filter
results.
This is part of the code that I have now:
Sheets("Screens").Select
Range("B9:FA9").Select
Selection.Copy
Sheets("List").Select
Range("AI6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.Run "ShowAll"
Application.Run "Run_All_Filters"
Range("D13").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Selector").Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
How do I modify this so if D13 is blank and there is nothing to select, it
will skip on to the next part of the code?
Thanks...