+ Reply to Thread
Results 1 to 7 of 7

Macro to print from Sheet payment advice BR1 to last sheet

  1. #1
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,722

    Macro to print from Sheet payment advice BR1 to last sheet

    I have written a macro to print from sheet "Payment advise BR1" to last sheet range "A1:H40"

    where cell C9 is blank, then that sheet must not be printed

    Where running the macro it print blank sheets


    It would be appreciated if someone could kindly amend my code


    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    06-27-2010
    Location
    sYRIA
    MS-Off Ver
    Excel 2013
    Posts
    669

    Re: Macro to print from Sheet payment advice BR1 to last sheet

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,722

    Re: Macro to print from Sheet payment advice BR1 to last sheet

    Thanks for the help. Code works perfectly

    It would be appreciated if you could amend code so that each sheet fits on one page

    I have tried to do this, but get a run time error

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,722

    Re: Macro to print from Sheet payment advice BR1 to last sheet

    I have attached sample data.

    I have highlighted those sheet tabs to be printed in Red (cheque advise BR1 onwards) . Where C9 is blank, then that sheet is not to be printed


    Kindly test and amend code



    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,722

    Re: Macro to print from Sheet payment advice BR1 to last sheet

    I managed to resolve problem

    See my code below

    Please Login or Register  to view this content.

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

    Re: Macro to print from Sheet payment advice BR1 to last sheet

    ? Why in the "For Next" loop every time turn off this (DisplayAlerts, ScreenUpdating) what has already been turned off once ?
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,722

    Re: Macro to print from Sheet payment advice BR1 to last sheet

    Thanks for the advise and Code mjr veverka

    The Sheet Names are a combination of upper & lower case, for e.g. Payment Advice BR1

    Kindly amend code

+ 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. Attach a macro to a print button that will print a certain row on my sheet
    By neen149 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 01-09-2021, 05:24 PM
  2. Replies: 1
    Last Post: 11-15-2019, 02:57 AM
  3. Print Macro for multiple but different print pages of the same sheet
    By dgarrod in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-18-2017, 02:55 PM
  4. Advice: Print to PDF OR Print to Printer macro
    By Brenton555 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-03-2016, 07:12 PM
  5. Macro slows down when I print/print preview/page break a sheet
    By Grug in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-07-2015, 08:59 PM
  6. [SOLVED] Efficiency advice. Finding record status on a sheet to update another sheet.
    By Opy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-12-2012, 09:23 PM
  7. Macro to Print Update and Print Sheet
    By erock24 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-26-2007, 11:10 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