Solved

Print sheet but no command button

Posted on 2014-04-19
2
283 Views
Last Modified: 2014-04-19
Folks,
I have a module that prints my worksheets.
Sub PrintSheet()
    Dim UserResponse
    UserResponse = MsgBox(Prompt:="Print Worksheet (Yes) for Print Preview", Buttons:=vbYesNoCancel, Title:="Print Worksheet")
    Select Case UserResponse
        Case vbCancel
            Exit Sub
        Case vbYes
           ' ActiveSheet.PrintOut Preview:=True
           PrintToFit
        Case Else
        PrintToFit
             ActiveSheet.PrintOut Copies:=1
    End Select

End Sub

Open in new window


The "PrintToFit" is just another called module that scales the print to fit one page.

I would like to have the function that when a worksheet is print it does not print any of the command buttons as see below:
No print command button
0
Comment
Question by:Frank Freese
2 Comments
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 500 total points
ID: 40010614
Go to the properties of each of the buttons and on the last tab there is an option to disable printing of the shape.
0
 

Author Closing Comment

by:Frank Freese
ID: 40010629
great but that was too easy - I'd never noticed that before
thanks - great job
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question