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: 51
Default Long print ranges in VBA

I am trying to get VBA to set a long print range. I have been able to get
this to work and set up printing for 22 reports. I would like it to be able
to work for 23-24 reports, but it appears I dont have the VBA
continuation/wrapping code right or it is a VBA limitataion.

I have commented out the 23 and 24 report options, after a number of
attempts at using some kind of continuation syntax.

Can someone please help with this? If this cannot be directly coded,
perhaps there is a workaround.

Thanks.


If n = 22 Then
'Studies = 22
Sheets("Report").Select
Range( _

"C36:U119,C236:U319,C436:U519,C636:U719,C836:U919, C1036:U1119,C1236:U1319,C1436:U1519,C1636:U1719,C1 836:U1919,C2036:U2119,C2236:U2319,C2436:U2519,C263 6:U2719,C2836:U2919,C3036:U3119,C3236:U3319,C3436: U3519,C3636:U3719,C3836:U3919,C4036:U4119,C4236:U4 319" _
).Select
ActiveSheet.PageSetup.PrintArea = _

"C36:U119,C236:U319,C436:U519,C636:U719,C836:U919, C1036:U1119,C1236:U1319,C1436:U1519,C1636:U1719,C1 836:U1919,C2036:U2119,C2236:U2319,C2436:U2519,C263 6:U2719,C2836:U2919,C3036:U3119,C3236:U3319,C3436: U3519,C3636:U3719,C3836:U3919,C4036:U4119,C4236:U4 319"
End If

'If n = 23 Then
'Studies = 23
' Sheets("Report").Select
' Range( _
'
"C36:U119,C236:U319,C436:U519,C636:U719,C836:U919, C1036:U1119,C1236:U1319,C1436:U1519,C1636:U1719,C1 836:U1919,C2036:U2119,C2236:U2319,C2436:U2519,C263 6:U2719,C2836:U2919,C3036:U3119,C3236:U3319,C3436: U3519,C3636:U3719,C3836:U3919,C4036:U4119,C4236:U4 319,C4436:U4519" _
' ).Select
' ActiveSheet.PageSetup.PrintArea = _
'
"C36:U119,C236:U319,C436:U519,C636:U719,C836:U919, C1036:U1119,C1236:U1319,C1436:U1519,C1636:U1719,C1 836:U1919,C2036:U2119,C2236:U2319,C2436:U2519,C263 6:U2719,C2836:U2919,C3036:U3119,C3236:U3319,C3436: U3519,C3636:U3719,C3836:U3919,C4036:U4119,C4236:U4 319,C4436:U4519"
'End If

'If n = 24 Then
'Studies = 24
' Sheets("Report").Select
' Range( _
'
"C36:U119,C236:U319,C436:U519,C636:U719,C836:U919, C1036:U1119,C1236:U1319,C1436:U1519,C1636:U1719,C1 836:U1919,C2036:U2119,C2236:U2319,C2436:U2519,C263 6:U2719,C2836:U2919,C3036:U3119,C3236:U3319,C3436: U3519,C3636:U3719,C3836:U3919,C4036:U4119,C4236:U4 319,C4436:U4519,C4636:U4719" _
' ).Select
' ActiveSheet.PageSetup.PrintArea = _
'
"C36:U119,C236:U319,C436:U519,C636:U719,C836:U919, C1036:U1119,C1236:U1319,C1436:U1519,C1636:U1719,C1 836:U1919,C2036:U2119,C2236:U2319,C2436:U2519,C263 6:U2719,C2836:U2919,C3036:U3119,C3236:U3319,C3436: U3519,C3636:U3719,C3836:U3919,C4036:U4119,C4236:U4 319,C4436:U4519,C4636:U4719"
'End If
 
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 to print a very long column Duncan Dee Excel Discussion (Misc queries) 3 February 6th 09 05:54 PM
setting print ranges to print based on option bluegrassstateworker Excel Programming 4 May 5th 07 02:14 PM
Print Area ranges print on separate pages? Lyndon Excel Discussion (Misc queries) 1 December 29th 06 05:22 PM
how do you keep fields in a column to print out for long list Mike Setting up and Configuration of Excel 1 August 31st 05 09:14 PM
print long text nk Excel Programming 1 April 19th 05 01:41 PM


All times are GMT +1. The time now is 12:18 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"