+ Reply to Thread
Results 1 to 2 of 2

Help with VBA Code to print my pre-selected area in worksheet

  1. #1
    Forum Contributor
    Join Date
    06-17-2014
    Location
    london
    MS-Off Ver
    365
    Posts
    398

    Help with VBA Code to print my pre-selected area in worksheet

    Hi All

    I would appreciate any help with my problem, as I am a beginner at VBA.

    I have attached a simple sample spreadsheet to show what I need to be done.

    I need a VBA code so that when a user presses on the Print command button it will print the area which I have defined as a print area beforehand i.e. I have selected a set print area to be from a4:a20 and I need this area to be printed in Landscape and all fitted in one sheet on a selected printer and in colour.
    I have various worksheets in my actual workbook and all have different areas to be printed. Im not sure what is the best way to set this up i.e. I set the print areas beforehand or allow the user to to this via the VBA code. I need to distribute the spreadsheet to all my directors and they should be be to print their relevant worksheet by clicking on the print button which I have inserted on every worksheet for them. But I do need them to be able to select their printer or just automatically choose their default printer (I think the later will be easier to do) as this worksheet will be distributed to various departments.
    I hope I am clear in what I want to do. In summary when a user clicks on Print button, it will select the user’s default printer and prints the pre-selected print area on one sheet and in landscape and colour.

    Any help is appreciate it
    Attached Files Attached Files

  2. #2
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Help with VBA Code to print my pre-selected area in worksheet

    Okay,
    Quick Print option is there for all you need. As you said Print areas are to be set manually, so after that just set the orientation to Landscape and Press Quick Print button.
    If you want a code then here is it.

    Please Login or Register  to view this content.
    Regards,
    Vikas Gautam
    Excel-buzz.blogspot.com

    Excel is not a matter of Experience, its a matter of Application.

    Say Thanks, Click * Add Reputation

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Set print area of selected range then print preview if ok then print the document!
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-01-2014, 07:10 AM
  2. print selected area
    By lastnn30 in forum Excel General
    Replies: 7
    Last Post: 04-12-2013, 08:20 AM
  3. Modify code to email a selected range or ("print area") in lieu of ActiveSheet
    By robertse in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-15-2010, 05:15 PM
  4. set print area from selected range
    By Graham Whitehead in forum Excel General
    Replies: 3
    Last Post: 07-12-2006, 05:10 AM
  5. Print Area:What would be the code for setting the print area
    By wammer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-02-2005, 02:05 AM

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