+ Reply to Thread
Results 1 to 3 of 3

Open Workbook with windows Dialog Box & Print then close

  1. #1
    Registered User
    Join Date
    11-29-2016
    Location
    India
    MS-Off Ver
    2010 2007
    Posts
    59

    Open Workbook with windows Dialog Box & Print then close

    Hi all,

    I am trying explain it as simple as possible.
    I would like to have a changes in the below mentioned macro.

    "
    Sub Print_Bills()

    Dim intChoice As Integer

    Application.FileDialog(msoFileDialogOpen).InitialFileName = "C:\Users\Bills\"

    intChoice = Application.FileDialog(msoFileDialogOpen).Show






    Call PrintArea

    End Sub
    "

    My requirement is -
    I need to print work books in a particular folder one after one by selecting it.

    In this particular path folder (C:\Users\Bills\) each work book name & sheet name will be different. There will be only one worksheet in each workbook.

    There will be only one worksheet in each workbook. But the printing area will be same for all the workbooks.

    For Ex:

    Say there are 10 invoice workbooks in a folder as file name 2016-17-001, 2016-17-002, 2016-17-003, 2016-17-004 and so on...
    And in each invoice workbooks sheet name will be 001, 002, 003, 004 and so on

    Now i would like to print each one of this work book individually by selecting & opening work books one after one.

    Inside all the invoice workbooks print area will be same from cell A6 to R179. This process i am calling it through "Call PrintArea"

  2. #2
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: Open Workbook with windows Dialog Box & Print then close

    Try this one
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    12-23-2012
    Location
    Pakistan
    MS-Off Ver
    Microsoft office LTSC professional plus 2021 version 2403 (Build 17425.20176)
    Posts
    365

    Re: Open Workbook with windows Dialog Box & Print then close

    sorry for wrong post

+ 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. Copy from first workbook, close open new workbook paste close
    By johncarr1952 in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 08-04-2021, 08:50 AM
  2. [SOLVED] Issue with Open, copy, close Macro - when trying to close workbook Clipboard error
    By seanpcorbett1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-13-2016, 05:14 PM
  3. windows open file dialog box
    By Megatronixs in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-07-2014, 04:32 AM
  4. Refresh all queries on workbook open, when finished print to pdf then close workbook
    By Bree Harvey in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-06-2014, 04:53 AM
  5. Open Print Dialog Box
    By kmlloyd in forum Excel General
    Replies: 2
    Last Post: 02-23-2010, 12:43 PM
  6. open print dialog (File ---> Print...)
    By snaggy^^ in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-21-2006, 02:30 PM
  7. [SOLVED] using Windows API Open Dialog/Browse in VBA - center form in scree
    By Philip in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-19-2005, 10:06 AM

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