LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,290
Default setting the print area from a macro

You are welcome, glad you got it figured out.
Jim Cone
San Francisco, USA


"Joe Farruggio"
wrote in message
Joe Farruggio wrote:
The problem is solved. The macro now looks like this

Sub Macro1()
' Macro1 Macro
' Macro recorded 11/23/2006 by Joe Farruggio

Cells(1, 1).Select
Num = Cells(2, 6).Value
Numg = Cells(3, 3).Value
x = Range(Cells(1, 1), Cells(9 + Num, 3 + Numg)).Address
ActiveSheet.PageSetup.PrintArea = x
ActiveWindow.ActiveSheet.PrintPreview
End Sub

Seems that all the other junk i had inserted during the testing phase
was screwing up the works.
Thanks again for your help- couldn't have done it without you


 
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
Print Area Shifts Matt Excel Discussion (Misc queries) 0 October 11th 06 05:14 PM
error when running cut & paste macro Otto Moehrbach Excel Worksheet Functions 4 August 9th 06 01:49 PM
Macro to include Close Print Preview Vic Charts and Charting in Excel 1 January 9th 06 01:06 AM
Setting up a macro to print? Abi Excel Worksheet Functions 0 January 10th 05 08:09 PM
Changing print area Aaron Excel Discussion (Misc queries) 2 January 9th 05 05:58 PM


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