• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Printing Hidden Sheets

Shazz

Member
Hi,

I have a dashboard which I have various buttons on, I want to be able to have a button to print particular hidden sheets, I have set up a macro but this prints the dashboard as well as the hidden sheet.

The sheet I want to print is called "Start Dates" anyone have any suggestions.

Shazz
xx
 
As you haven't shared the code then you would try something like below.

Code:
Sub printWS()
With Sheets("Start Dates")
    .Visible = -1
    .PrintOut
    .Visible = 2
End With
End Sub
 
Sorry the code that comes up when I create the macro is below.

Code:
Sub Print_StartDates()
'
' Print_StartDates Macro
'

'
    Sheets("Dashboard").Select
    Sheets("Start Dates").Visible = True
    ActiveWindow.SelectedSheets.PrintOut Copies:=1
End Sub
 
I fort to say that the code you gave below did not work.

Code:
Sub printWS()
With Sheets("Start Dates")
    .Visible = -1
    .PrintOut
    .Visible = 2
End With
End Sub
 
Can you elaborate on what "did not work" means? Did the code error out, did nothing happen, did the wrong sheet print out?
 
Back
Top