+ Reply to Thread
Results 1 to 3 of 3

Print Title Rows VBA Macro

  1. #1
    Registered User
    Join Date
    05-09-2020
    Location
    Buenos Aires, Argentina
    MS-Off Ver
    2010
    Posts
    3

    Exclamation Print Title Rows VBA Macro

    Hi guys, Im new programming in VBA and I have a doubt. I create a macro to set the printing format that I need in all my files but I cant set the title rows. I could set just one row but I need two rows (variables E and F)

    This is what I did,

    Dim E As Integer

    Dim F As Integer

    E = ActiveCell.Row

    F = E + 1


    Application.PrintCommunication = False
    With ActiveSheet.PageSetup
    .PrintTitleRows = ActiveSheet.Rows(E).Address
    .PrintTitleColumns = ""
    End With
    Application.PrintCommunication = True
    ActiveSheet.PageSetup.PrintArea = Range("A1", Cells(A, B)).Address

    In this case I could set only a tittle row (E) but I need to set the two rows (E and F), dont know how to modify this code, can you please help me? it can be so difficult

    Thanks a lot

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

    Re: Print Title Rows VBA Macro

    Welcome to the forum,

    1. Use code tags
    2. Try:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-09-2020
    Location
    Buenos Aires, Argentina
    MS-Off Ver
    2010
    Posts
    3

    Re: Print Title Rows VBA Macro

    That worked perfectly! thanks a lot

+ 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. Formula or Macro to match up rows containing same title or issn
    By SonDur in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-02-2016, 05:34 PM
  2. [SOLVED] bug fix print title code
    By BoundToExcel in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-20-2015, 04:19 PM
  3. Print only visible rows and a print to or save as pdf Macro
    By rlebeausw in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-08-2011, 10:08 PM
  4. Replies: 19
    Last Post: 03-18-2009, 05:47 PM
  5. print title on all pages
    By legolas in forum Excel General
    Replies: 2
    Last Post: 05-07-2008, 03:44 AM
  6. Print Title
    By Schlic in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 01-22-2008, 02:28 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