Hi again,
Thanks for that information.
See if the following code does what you need:
Option Explicit
'=========================================================================================
'=========================================================================================
Sub PrintWorkbook()
Const dHEIGHT As Double = 1.2
Const dWIDTH As Double = 0.9
Dim shp As Shape
Set shp = ActiveSheet.Shapes.AddShape(msoShapeRectangle, 11.25, 76.5, 51, 17.25)
With shp
.Name = "btnPrint"
.TextFrame2.TextRange.Characters.Text = "PRINT"
With .TextFrame2.TextRange.Characters(1, 5)
.ParagraphFormat.FirstLineIndent = 0
.ParagraphFormat.Alignment = msoAlignLeft
With .Font
.NameComplexScript = "+mn-cs"
.NameFarEast = "+mn-ea"
.Size = 11
.Name = "+mn-lt"
With .Fill
.ForeColor.ObjectThemeColor = msoThemeColorLight1
.ForeColor.TintAndShade = 0
.ForeColor.Brightness = 0
.Transparency = 0
.Visible = msoTrue
.Solid
End With
End With
End With
.ScaleHeight 1.1304347826, msoFalse, msoScaleFromTopLeft
.ScaleWidth 0.8529411765, msoFalse, msoScaleFromTopLeft
.OnAction = "PRINTWKBK" ' <<< Insert the appropriate routine name here
End With
ActiveSheet.Range("A9").Select
End Sub
'=========================================================================================
'=========================================================================================
Sub PRINTWKBK_Version_1()
' This routine prints the entire workbook without using the "Print" DialogBox
ActiveWorkbook.PrintOut
End Sub
'=========================================================================================
'=========================================================================================
Sub PRINTWKBK_Version_2()
' This routine displays the "Print" DialogBox with the "EntireWorkbook" option selected
Application.Dialogs(xlDialogPrint).Show , , , , , , , , , , , 3
End Sub
Hope this helps - please let me know how you get on.
Regards,
Greg M
Bookmarks