#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default PrintArea


Hi All

I Have dates listed all across an excel sheet in Row 6.
I am finding the column of today's date using this:

Set datecol = Rows("6:6").Find(What:=Date, After:=Range("C6")
LookIn:=xlValues)
datelet = datecol.Column

(In my example, datelet = 29 which is Column AC)

I then want to set the printarea as:

Activesheet.PageSetup.PrintArea = "A4:???15"

where the printarea would be "A4:AC15" but can't seem to figure i
out.

Thanks for all the help.
R

--
rickey2
-----------------------------------------------------------------------
rickey24's Profile: http://www.excelforum.com/member.php...fo&userid=1035
View this thread: http://www.excelforum.com/showthread.php?threadid=26697

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default PrintArea

Activesheet.PageSetup.PrintArea =
Range(Range("A4"),Cells(15,DateCol.Column)).Addres s(External:=True)

--
Regards,
Tom Ogilvy


"rickey24" wrote in message
...

Hi All

I Have dates listed all across an excel sheet in Row 6.
I am finding the column of today's date using this:

Set datecol = Rows("6:6").Find(What:=Date, After:=Range("C6"),
LookIn:=xlValues)
datelet = datecol.Column

(In my example, datelet = 29 which is Column AC)

I then want to set the printarea as:

Activesheet.PageSetup.PrintArea = "A4:???15"

where the printarea would be "A4:AC15" but can't seem to figure it
out.

Thanks for all the help.
RH


--
rickey24
------------------------------------------------------------------------
rickey24's Profile:

http://www.excelforum.com/member.php...o&userid=10359
View this thread: http://www.excelforum.com/showthread...hreadid=266971



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting PrintArea by using Named Ranges Oren Klaber Excel Programming 2 January 30th 04 10:34 PM
set printarea to invisible Tom Excel Programming 0 January 26th 04 01:25 PM
Problem with PrintArea property Ugleeduck Excel Programming 1 December 5th 03 05:26 PM
PRINTAREA Giacomo[_3_] Excel Programming 4 October 28th 03 10:43 PM
Asking user to set a printarea when none is defined Michael J. Malinsky Excel Programming 0 July 23rd 03 06:34 PM


All times are GMT +1. The time now is 10:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"