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: 618
Default setting print area via VBA

Hi All

having trouble (Excel 2000) setting the print area
i create a form, populated with values from a database and then copy this
form to a new workbook. In the original form i created a named range,
which, of course goes into the new book. What i want to do is use the name
range to set the print area for the form in the new workbook.

This process is all run from the OKbutton on a userform.

For some reason i keep getting a "can not set print area" message no matter
which way i try

currently my code (after trying everything i can think of) goes like this
sheets("packinglist").activate
sheets("packinglist").copy
unload userform2
msgbox "You can now print the packing list"
i =workbooks.count
workbook(i).activate
sheets("packinglist").activate
activesheet.pagesetup.printarea = range("PackingList")

any ideas?

Thanks
JulieD



 
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 Setting RozBuds Excel Discussion (Misc queries) 3 February 19th 10 09:41 PM
Setting The Print-Area ? Robert11[_3_] New Users to Excel 2 May 31st 09 03:24 PM
Setting print area richzip Excel Discussion (Misc queries) 1 April 27th 08 08:10 AM
SETTING PRINT AREA IN VBA Frankie[_2_] Excel Programming 6 June 24th 04 03:11 PM
Setting print area Don Guillett[_4_] Excel Programming 0 September 4th 03 02:14 PM


All times are GMT +1. The time now is 08:33 PM.

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"