Return toi sheet after printing

I would like to change my macro to return to the sheet from where it came after printing and I can't seem to get there. Here my code
Sub FontsFillsPrint()
'
' FontsFillsPrint Macro
'

'
    Sheets("InstructionsFontsFillsAlignment").Select
    Range("A2:K70").Select
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
        IgnorePrintAreas:=False
' AFTER IT PRINTS I WANT TO RETURN TO THE WORKSHEEET "FILLSFONTSALIGNMENT
End Sub

Open in new window

Frank FreeseAsked:
Who is Participating?
 
Saurabh Singh TeotiaCommented:
Fh_freese you are missing a brack in the above comment..You wrote..

Sheets("FontsFillsAlignment".Select

However it should be...

Sheets("FontsFillsAlignment").Select

In additional if you are writing this in sheet module apart then of FontsFillsAlignment sheet..then it will give you an error..request you to please move this code in the new module or this workbook and it should work...
0
 
FlysterCommented:
Just use Sheets("FillsFontsAlignment").Select :
Sub FontsFillsPrint()
'
' FontsFillsPrint Macro
'

'
    Sheets("InstructionsFontsFillsAlignment").Select
    Range("A2:K70").Select
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
        IgnorePrintAreas:=False
Sheets("FillsFontsAlignment").Select

End Sub
Sheets("FillsFontsAlignment").Select

Open in new window

Flyster
0
 
Frank FreeseAuthor Commented:
I made a mistake in my question in that I wanted to return to "FontsFillsAlignment" not "FillsFontsAlignment".
The macro is associated with a text box located on the "FontsFillsAlignment" worksheet. Everything prints OK but when I want to return to the "FontsFillAlignment" worksheet I get an error at Sheets("FontsFillsAlignment".Select

Run-time error 9error 9
Subscript out of Range
0
 
Frank FreeseAuthor Commented:
Folks,
I apologize for taking everyones time. The problem was a typo in the worksheet - it should have been Sheets("FontsFillsAlignments").Select. I left off the last "s".
0
 
Frank FreeseAuthor Commented:
thank you kindly
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.