Title says it all. Stepping through the below code does as desire but running the macro doesn't. I am specifically having issues with the Else portion. This is what happens when I run the macro
CountA(Range("B2:B5")) currently equals 3 so goes to Else
Excel pauses for 5 seconds
then image "Dennis" flashes and disappears.
Running in step through (This is what I want)
CountA(Range("B2:B5")) currently equals 3 so goes to Else
Image "Dennis" appears
Excel pauses for 5 seconds
Image "Dennis" disappears
End
Thoughts?
Private Sub Image1_Click()
Application.ScreenUpdating = True
If Application.WorksheetFunction.CountA(Range("B2:B5")) = 4 Then
ActiveSheet.PageSetup.LeftFooter = Format(Now, "yyyy.mmm.dd HH:MM")
Sheets("Temp Logger|GPS Setup").Select
ExportAsFixedFormat Type:=xlTypePDF, Filename:="C:\Users\Ethan\Desktop\" & Sheets("Temp Logger|GPS Setup").Range("A1") & ".pdf", Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True
Else
Shapes("Dennis").Visible = msoTrue
Application.Wait (Now + TimeValue("00:00:05"))
Shapes("Dennis").Visible = msoFalse
End If
End Sub
Bookmarks