Link to home
Start Free TrialLog in
Avatar of MeMike
MeMikeFlag for United States of America

asked on

Excel Print Macros

Good Evening,

I have a signal excel workbook created in office 2010 Std with 6 worksheets; all sheets have the print area's set to print on a signal page. What I need to do and I'm trying to figure out is how to create a macro button that I will place on sheet 1 so when pressed will bring up a menu to chose which sheets to need to be printed.

thank you  in advance,

MA

Avatar of SiddharthRout
SiddharthRout
Flag of India image

Is this what you want?

Sample file attached. Please amend it to suit your needs.

Sid

Code Used

Private Sub UserForm_Initialize()
    Dim ws As Worksheet
    For Each ws In ThisWorkbook.Sheets
        ComboBox1.AddItem ws.Name
    Next
End Sub

Open in new window

Print-Sample.xlsm
Avatar of MeMike

ASKER

Its seems very simple but I can't get it to print to my default network printer nothing prints no error message
Show me the code that you are using? Or better still upload your file.

Sid
Avatar of MeMike

ASKER

is this a macro or a VB script?
Avatar of MeMike

ASKER

To make it easy for myself I uncerted all tabs (worksheets) to your doc but I even re-downloaded your sample file and tried to print?
No work!!
The file that I gave doesn't print. It is to show you how to populate the sheetnames in the combo as you requested. I thought you already had the 'Print Code'. You have to write another few lines in the click event of the button to print.

What exactly do you want to print? I'll update the code and post it back.

Sid
Avatar of MeMike

ASKER

To print to the default print of the machine/PC that opens the file.

Sorry :(
Ok. give me few moments :)

Sid
ASKER CERTIFIED SOLUTION
Avatar of SiddharthRout
SiddharthRout
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MeMike

ASKER

Great job  Thanks