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: 430
Default proper syntax in code needed

I need to use something like this in my code:
Activesheet.PageSetup.PrintArea = "$A$1:$C$5"

but I need to substitute the address range above to or as follows:

Where I already have a variable "Lrow" = 7122

I wish to print the area:

A7082 (<< this # set to Lrow minus 40) : H7122

I can't get syntax to work - I've tried:

PrtRng = Range("A & LRow - 45 & ":I" & LRow) << Not being accepted

Tks in Advance for helping,,


 
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
Proper syntax for this Barb Reinhardt Excel Discussion (Misc queries) 1 August 4th 06 02:15 PM
proper syntax order Roberta H via OfficeKB.com Excel Worksheet Functions 2 January 18th 06 10:14 PM
VBA code to sum a row: syntax needed [email protected] Excel Discussion (Misc queries) 1 July 11th 05 06:41 PM
Syntax needed for With count Excel Programming 4 April 6th 04 02:33 PM
Proper syntax to Set a Workbook Object? Rick Stanford Excel Programming 2 September 13th 03 07:15 PM


All times are GMT +1. The time now is 05:56 AM.

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

About Us

"It's about Microsoft Excel"