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
printarea is looking for a string.
--
Regards,
Tom Ogilvy
"JulieD" <Jul...@hctsReMoVeThIs.net.au> wrote in message
news:uhZGxbqi...@tk2msftngp13.phx.gbl...
"Rodney POWELL" <rod...@beyondtechnology.com> wrote in message news:%23xuTJoq...@tk2msftngp13.phx.gbl...
Sub printpackinglist()
'Sheets("packinglist").Range("packinglistprintarea").Printpreview
Sheets("packinglist").Range("packinglistprintarea").PrintOut
End Sub
--
Don Guillett
SalesAid Software
don...@281.com
"JulieD" <Jul...@hctsReMoVeThIs.net.au> wrote in message
news:uhZGxbqi...@tk2msftngp13.phx.gbl...
i can't :(
i don't have a printer installed on the machine i'm programming on (don't
ask!) ... so i can't run code with those two lines in it.
Cheers
JulieD
"Don Guillett" <don...@281.com> wrote in message
news:e6fe5uq...@TK2MSFTNGP09.phx.gbl...
activesheet.pagesetup.printarea = "PackingList"
>.
>
--
Don Guillett
SalesAid Software
don...@281.com
"JulieD" <Jul...@hctsReMoVeThIs.net.au> wrote in message
news:OpU$b6qiEH...@TK2MSFTNGP12.phx.gbl...
sad isn't it (but i do have a lovely new chair, a stapler & a sticky tape
dispenser)
Cheers
JulieD
"Don Guillett" <don...@281.com> wrote in message
news:eEUe8Esi...@TK2MSFTNGP10.phx.gbl...
--
Don Guillett
SalesAid Software
don...@281.com
"JulieD" <Jul...@hctsReMoVeThIs.net.au> wrote in message
news:ueRobIsi...@tk2msftngp13.phx.gbl...