+ Reply to Thread
Results 1 to 2 of 2

If cell is active (text in cell) print area (A1:?52) Please see code I think I am Close

  1. #1
    Registered User
    Join Date
    01-16-2013
    Location
    Alaska
    MS-Off Ver
    Excel 2007
    Posts
    54

    If cell is active (text in cell) print area (A1:?52) Please see code I think I am Close

    Hello All,

    I am trying to print area where if cells D5:LC5 are active (have text in them) it would print area A1 to ?52, so if I have writing in cell H5 it would print A1 to H52, I think I am getting close plase help,Jeff

    Here in my current print code
    Private Sub Workbook_BeforePrint(Cancel As Boolean)
    With Sheets("Sheet1")
    .PageSetup.PrintArea = "$A$1:$LC$52" & _
    .Range("D5:LC5").Find("*", .Range("A1:LC52"), xlValues, xlWhole, xlByRows, xlPrevious).Row
    End With
    End Sub
    Thank you for any and all help, Jeff

  2. #2
    Registered User
    Join Date
    01-16-2013
    Location
    Alaska
    MS-Off Ver
    Excel 2007
    Posts
    54

    Re: If cell is active (text in cell) print area (A1:?52) Please see code I think I am Clos

    anyone, I have done a search but did not come up with much for VBA print area

  3. #3
    Registered User
    Join Date
    01-16-2013
    Location
    Alaska
    MS-Off Ver
    Excel 2007
    Posts
    54

    Re: If cell is active (text in cell) print area (A1:?52) Please see code I think I am Clos

    Bump, do I need to explaine better?

+ 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