Hello All,
Please could someone explain why the following module breaks when in break mode (when each line run in turn using the F8 button) but when I run the macro out of break mode it is fine (in break mode it is failing on the last line shown below):
Thanks,
Stu
Please could someone explain why the following module breaks when in break mode (when each line run in turn using the F8 button) but when I run the macro out of break mode it is fine (in break mode it is failing on the last line shown below):
Code:
Sub Outputreport()
Application.DisplayAlerts = False
Rowno = 6
Do Until Cells(Rowno, 1) = ""
'Cells(Rowno, 1).Select
WkName = Cells(Rowno, 1).Value
SaveName = WkName & Cells(2, 3).Value
Windows("ReportCreationMacro.xls").Activate
Sheets("FunctionReports").Select
Selection.AutoFilter Field:=4, Criteria1:=WkName
Thanks,
Stu