LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Range is not being picked up


Please take a look at my code, I am trying to pick up the range and
print it, depending on the analysis years.

Dim area As String
Dim startrow(1) As Integer
Dim startcol(1) As Integer
Dim endrow(1) As Integer
Dim endcol(1) As Integer
Dim vern_startrow(1) As Integer
Dim vern_startcol(1) As Integer
Dim vern_endrow(1) As Integer
Dim vern_endcol(1) As Integer

fstyr = Range("FirstAll")
lstyr = Range("LastAll")

Sheets("Personal P_L").Select
For i = 1 To 15
startrow(1) = 1
startcol(1) = 20 'T
endrow(1) = 56 + 2 * (lstyr - fstyr)
endcol(1) = 46 'AT
With ActiveSheet.PageSetup
..Orientation = xlLandscape
..PaperSize = xlPaperLegal
..Range(.Cells(startrow, startcol), .Cells(endrow,
endcol)).Select
End With
Selection.PrintOut Copies:=1, Collate:=True
Next i

It gives me an error regarding my Range function...any help???

Thanks!


--
Sheeny
------------------------------------------------------------------------
Sheeny's Profile: http://www.excelforum.com/member.php...fo&userid=9082
View this thread: http://www.excelforum.com/showthread...hreadid=538967

 
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
how do you have 2 criterias be picked up in a lookup? N. Vu Excel Worksheet Functions 5 June 30th 09 11:57 PM
Posts not getting picked up T. Valko Excel Discussion (Misc queries) 5 March 28th 07 01:58 AM
Range is not being picked up Sheeny[_25_] Excel Programming 1 May 4th 06 07:55 PM
For each picked entitiy in a list box... Ctech[_115_] Excel Programming 8 March 21st 06 05:28 PM
Just a tip I have picked-up Beto[_3_] Excel Programming 2 February 5th 04 09:13 PM


All times are GMT +1. The time now is 07:22 AM.

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"