+ Reply to Thread
Results 1 to 3 of 3

Printing a sheet in Visual Basic

Hybrid View

B_Taylor Printing a sheet in Visual... 02-03-2008, 06:44 PM
shg Perhaps ... 02-03-2008, 06:48 PM
B_Taylor Ah yes, that works... 02-03-2008, 07:09 PM
  1. #1
    Registered User
    Join Date
    01-26-2008
    Posts
    9

    Printing a sheet in Visual Basic

    Hiya Guys,
    The program I'm working on will have a button that will allow you to print the sheet from within the visual basic application. I've tried:

    Sheets("Scattergraph").PrintOut
    But that doesn't open the print dialogue box, which is important, since the running environment for the finished product has multiple printers and so I want the user to be able to choose the one they want to print from.

    Any help's appreciated.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Perhaps
    Application.Dialogs(xlDialogPrint).Show

  3. #3
    Registered User
    Join Date
    01-26-2008
    Posts
    9
    Ah yes, that works smashingly!

    My code now reads:
    Sheets("Scattergraph").Select
    Application.Dialogs(xlDialogPrint).Show
    'Reverts back to sheet1 so user cannot mess around with the output sheets
    Sheets("Sheet1").Select

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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