Closed Thread
Results 1 to 2 of 2

Print macro

  1. #1
    Registered User
    Join Date
    01-28-2014
    Location
    Washington, DC
    MS-Off Ver
    Excel 2003
    Posts
    13

    Print macro

    This is what I have

    Sub printsetarea()
    Dim pval As Integer
    pval = Range("a4:a50").Value("Theresa")
    ActiveSheet.PageSetup.PrintArea = "$A$1:$C$" & pval
    End Sub
    I'm trying to write it so that if the value "Theresa" is in column A to print out the corresponding rows only. I keep getting "runtime error 13" though.

    Thanks for any help

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Print macro

    Welcome to the Forum, unfortunately:

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Print Macro errors on final print command. Run-time error '1004':
    By Steverizer in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-05-2013, 06:41 PM
  2. [SOLVED] Pivot Table macro to set print area and print details of drill down data
    By Steve Haskins in forum Excel General
    Replies: 2
    Last Post: 12-28-2005, 01:10 PM
  3. [SOLVED] Create a print macro that would automatically select print area?
    By wastedwings in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  4. [SOLVED] Create a print macro that would automatically select print area?
    By wastedwings in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  5. Create a print macro that would automatically select print area?
    By wastedwings in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM

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