Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Once again I am frustrated by the almost useless Excel VBA programming help.
Why does such a large commercial program have such crappy help? I had better programming help back in the days of programming on the Atari ST! I need a way to set the print area where I know the starting and ending columns and rows. The only example the help gives is for the 'CurrentRegion.' There is no current region set, nor do I want to force the user to make one. I would prefer being able to use column and row numbers as opposed to the A1:G20 method. One would think this would be a simple thing, but here I am. Any help will be appreciated. -Steve |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() startcol = 1 startrow = 3 endcol = 9 endrow = 25 With Activesheet .PageSetup.PrintArea = .Range(.Cells(startRow,StartCol), _ .Cells(EndRow,EndCol)).Address(1,1,xlA1,True) End With -- Regards, Tom Ogilvy "Patch61" wrote: Once again I am frustrated by the almost useless Excel VBA programming help. Why does such a large commercial program have such crappy help? I had better programming help back in the days of programming on the Atari ST! I need a way to set the print area where I know the starting and ending columns and rows. The only example the help gives is for the 'CurrentRegion.' There is no current region set, nor do I want to force the user to make one. I would prefer being able to use column and row numbers as opposed to the A1:G20 method. One would think this would be a simple thing, but here I am. Any help will be appreciated. -Steve |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you use the recorder you can get the essential code needed (far easier
than trying to find it in Help!), e.g. ActiveSheet.PageSetup.PrintArea = "A1:J10" However, as you say, R1C1 method can be easier so it needs amendment: Dim myRange As String myRange = "R1C1:R10C10" myRange = Application.ConvertFormula(myRange, xlR1C1, xlA1) ActiveSheet.PageSetup.PrintArea = myRange or (combining it all up): ActiveSheet.PageSetup.PrintArea = Application.ConvertFormula("R1C1:R10C10", xlR1C1, xlA1) "Patch61" wrote: Once again I am frustrated by the almost useless Excel VBA programming help. Why does such a large commercial program have such crappy help? I had better programming help back in the days of programming on the Atari ST! I need a way to set the print area where I know the starting and ending columns and rows. The only example the help gives is for the 'CurrentRegion.' There is no current region set, nor do I want to force the user to make one. I would prefer being able to use column and row numbers as opposed to the A1:G20 method. One would think this would be a simple thing, but here I am. Any help will be appreciated. -Steve |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, guys. This is exactly what I needed.
-Steve "Tom Ogilvy" wrote: startcol = 1 startrow = 3 endcol = 9 endrow = 25 With Activesheet .PageSetup.PrintArea = .Range(.Cells(startRow,StartCol), _ .Cells(EndRow,EndCol)).Address(1,1,xlA1,True) End With -- Regards, Tom Ogilvy "Patch61" wrote: Once again I am frustrated by the almost useless Excel VBA programming help. Why does such a large commercial program have such crappy help? I had better programming help back in the days of programming on the Atari ST! I need a way to set the print area where I know the starting and ending columns and rows. The only example the help gives is for the 'CurrentRegion.' There is no current region set, nor do I want to force the user to make one. I would prefer being able to use column and row numbers as opposed to the A1:G20 method. One would think this would be a simple thing, but here I am. Any help will be appreciated. -Steve |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
feel better now?
Sub setprintarea() ActiveSheet.PageSetup.PrintArea = _ Range(Cells(4, 4), Cells(12, 8)).Address End Sub -- Don Guillett SalesAid Software "Patch61" wrote in message ... Once again I am frustrated by the almost useless Excel VBA programming help. Why does such a large commercial program have such crappy help? I had better programming help back in the days of programming on the Atari ST! I need a way to set the print area where I know the starting and ending columns and rows. The only example the help gives is for the 'CurrentRegion.' There is no current region set, nor do I want to force the user to make one. I would prefer being able to use column and row numbers as opposed to the A1:G20 method. One would think this would be a simple thing, but here I am. Any help will be appreciated. -Steve |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Setting The Print Area | Excel Programming | |||
setting a print area | Excel Programming | |||
Setting print area with vba | Excel Programming | |||
SETTING PRINT AREA IN VBA | Excel Programming | |||
Setting print area | Excel Programming |