Results 1 to 4 of 4

vba macro for print button that brings up print screen selection window

Threaded View

  1. #1
    Registered User
    Join Date
    05-10-2016
    Location
    petrolia, pa
    MS-Off Ver
    10
    Posts
    11

    vba macro for print button that brings up print screen selection window

    I have a print button already created and the macro brings up the print screen selection window for the user but I need this window to already be populated with 'entire workbook' selection. The workbook is emailed to the user and they click the print button.
    Thank you

    'CREATE PRINT BUTTON
        ActiveSheet.Shapes.AddShape(msoShapeRectangle, 11.25, 76.5, 51, 17.25).Select
        Selection.ShapeRange(1).TextFrame2.TextRange.Characters.Text = "PRINT"
        With Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 5). _
            ParagraphFormat
            .FirstLineIndent = 0
            .Alignment = msoAlignLeft
        End With
        With Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 5).Font
            .NameComplexScript = "+mn-cs"
            .NameFarEast = "+mn-ea"
            .Fill.Visible = msoTrue
            .Fill.ForeColor.ObjectThemeColor = msoThemeColorLight1
            .Fill.ForeColor.TintAndShade = 0
            .Fill.ForeColor.Brightness = 0
            .Fill.Transparency = 0
            .Fill.Solid
            .Size = 11
            .Name = "+mn-lt"
        End With
        Selection.ShapeRange.ScaleWidth 0.8529411765, msoFalse, msoScaleFromTopLeft
        Selection.ShapeRange.ScaleHeight 1.1304347826, msoFalse, msoScaleFromTopLeft
        'Selection.OnAction = "PRINTWKBK"
        Range("A9").Select
        
    'add print macro to button
    ActiveSheet.Shapes.Range(Array("Rectangle 1")).Select
        Selection.OnAction = "PERSONAL.xlsb!ON_CLICK_PRINT"
        Range("A8").Select
    Last edited by 6StringJazzer; 02-24-2020 at 12:41 PM. Reason: Moderator fixed attempt at tagging code

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Print button that still prints when cancelled at the printer setup window
    By despdel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-21-2020, 06:03 PM
  2. [SOLVED] Button To Print Specific cell Range On One Sheet In Print Selection
    By diddy47 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-03-2020, 06:23 AM
  3. [SOLVED] Print Button prints out a form different from the one showing on the screen
    By JET2011 in forum Access Tables & Databases
    Replies: 2
    Last Post: 01-31-2018, 03:39 PM
  4. Disabled print toolbar and menu but Print Macro button cannot print also...
    By zein97 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-22-2014, 01:42 PM
  5. Overlay an option button form on a print preview screen
    By BuckP in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-11-2013, 04:29 PM
  6. How do you add a 'print screen' button to a form?
    By familylink in forum Excel General
    Replies: 4
    Last Post: 06-28-2010, 03:32 AM
  7. Replies: 1
    Last Post: 10-27-2005, 06:00 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1