Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default macro to copy/paste print area

Hi all.
what would be involved in creating a macro that would read only the contents
of a worksheet within a pre-defined area of the print field?
Thank you.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default macro to copy/paste print area

hi
what do you mean by "read" only the print area.
excel looks at the print area as a name range and the name "Print_Area" even
appears in the name box and name dialog.
this line will select the print area
sub somesubname()
Range("print_area").select
end sub
but i don't think that's what you want.

post back with more info.
regards
FSt1
"SteveDB1" wrote:

Hi all.
what would be involved in creating a macro that would read only the contents
of a worksheet within a pre-defined area of the print field?
Thank you.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default macro to copy/paste print area

sorry about being so simplistic.
I've been trying to figure out how detailed to get, without being to
concise, as I've had really concise posts go unresponded to, and really to
somehwat vague posts get all kinds of responses.

what I want to accomplish is to have it look at the area I show as a "print
field" and then copy just that area in to a new worksheet. Part of the
problem is that I have equations, comments, and other data on the worksheet
that I don't want copied.

I've been looking around and have found a couple of macros that set a print
area based on the used range. but since I have more cells with data in them
than I normally print, I just want to pick the predefined area that we
normally print from.

Does that explain enough?
Thank you for your help.
Best.



"FSt1" wrote:

hi
what do you mean by "read" only the print area.
excel looks at the print area as a name range and the name "Print_Area" even
appears in the name box and name dialog.
this line will select the print area
sub somesubname()
Range("print_area").select
end sub
but i don't think that's what you want.

post back with more info.
regards
FSt1
"SteveDB1" wrote:

Hi all.
what would be involved in creating a macro that would read only the contents
of a worksheet within a pre-defined area of the print field?
Thank you.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default macro to copy/paste print area

hi
sorry it took so long to get back. got hung up.
your request seems simple enough. an old lotus save range macro.
sub steveDB1saverange()
range("Print_Area").copy
workbooks.add
Activesheet.paste
Application.Dialogs(xlDialogSaveAs).Show
end sub
macro assumes the print area is already set.
and i hope all the "equations, comments, and other data" are outside the
priint area because the copy command cann't copy multiple areas at once.

hope this helps
regards
FSt1


"SteveDB1" wrote:

sorry about being so simplistic.
I've been trying to figure out how detailed to get, without being to
concise, as I've had really concise posts go unresponded to, and really to
somehwat vague posts get all kinds of responses.

what I want to accomplish is to have it look at the area I show as a "print
field" and then copy just that area in to a new worksheet. Part of the
problem is that I have equations, comments, and other data on the worksheet
that I don't want copied.

I've been looking around and have found a couple of macros that set a print
area based on the used range. but since I have more cells with data in them
than I normally print, I just want to pick the predefined area that we
normally print from.

Does that explain enough?
Thank you for your help.
Best.



"FSt1" wrote:

hi
what do you mean by "read" only the print area.
excel looks at the print area as a name range and the name "Print_Area" even
appears in the name box and name dialog.
this line will select the print area
sub somesubname()
Range("print_area").select
end sub
but i don't think that's what you want.

post back with more info.
regards
FSt1
"SteveDB1" wrote:

Hi all.
what would be involved in creating a macro that would read only the contents
of a worksheet within a pre-defined area of the print field?
Thank you.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default macro to copy/paste print area

Hi FSt1,
No worries about time. Hope all is well.
Ok, I just tested the code, and it rejects the "Print_area" so I'm guessing
I need to define that area more concisely?

How do I accomplish that? My print area will vary from workbook to workbook,
so having a <variable "Print_Area" is critical.

I did find this topic in help, and it only discusses the use for
establishing/creating a print area, not one that's undefined-- beyond what I
have already.

Again-- thank you for your help.


"FSt1" wrote:

hi
sorry it took so long to get back. got hung up.
your request seems simple enough. an old lotus save range macro.
sub steveDB1saverange()
range("Print_Area").copy
workbooks.add
Activesheet.paste
Application.Dialogs(xlDialogSaveAs).Show
end sub
macro assumes the print area is already set.
and i hope all the "equations, comments, and other data" are outside the
priint area because the copy command cann't copy multiple areas at once.

hope this helps
regards
FSt1


"SteveDB1" wrote:

sorry about being so simplistic.
I've been trying to figure out how detailed to get, without being to
concise, as I've had really concise posts go unresponded to, and really to
somehwat vague posts get all kinds of responses.

what I want to accomplish is to have it look at the area I show as a "print
field" and then copy just that area in to a new worksheet. Part of the
problem is that I have equations, comments, and other data on the worksheet
that I don't want copied.

I've been looking around and have found a couple of macros that set a print
area based on the used range. but since I have more cells with data in them
than I normally print, I just want to pick the predefined area that we
normally print from.

Does that explain enough?
Thank you for your help.
Best.



"FSt1" wrote:

hi
what do you mean by "read" only the print area.
excel looks at the print area as a name range and the name "Print_Area" even
appears in the name box and name dialog.
this line will select the print area
sub somesubname()
Range("print_area").select
end sub
but i don't think that's what you want.

post back with more info.
regards
FSt1
"SteveDB1" wrote:

Hi all.
what would be involved in creating a macro that would read only the contents
of a worksheet within a pre-defined area of the print field?
Thank you.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default macro to copy/paste print area

FSt1,
I went back over the code you gave again, and changed it once again-- back
to what you gave. It works now. I don't know why it didn't work before, but
it rejected the global use, and after trying three variations on it, I reset
it to the original Print_Area and it now works. go figure! I'm guessing it's
a Friday thing.
Thank you.



"FSt1" wrote:

hi
sorry it took so long to get back. got hung up.
your request seems simple enough. an old lotus save range macro.
sub steveDB1saverange()
range("Print_Area").copy
workbooks.add
Activesheet.paste
Application.Dialogs(xlDialogSaveAs).Show
end sub
macro assumes the print area is already set.
and i hope all the "equations, comments, and other data" are outside the
priint area because the copy command cann't copy multiple areas at once.

hope this helps
regards
FSt1


"SteveDB1" wrote:

sorry about being so simplistic.
I've been trying to figure out how detailed to get, without being to
concise, as I've had really concise posts go unresponded to, and really to
somehwat vague posts get all kinds of responses.

what I want to accomplish is to have it look at the area I show as a "print
field" and then copy just that area in to a new worksheet. Part of the
problem is that I have equations, comments, and other data on the worksheet
that I don't want copied.

I've been looking around and have found a couple of macros that set a print
area based on the used range. but since I have more cells with data in them
than I normally print, I just want to pick the predefined area that we
normally print from.

Does that explain enough?
Thank you for your help.
Best.



"FSt1" wrote:

hi
what do you mean by "read" only the print area.
excel looks at the print area as a name range and the name "Print_Area" even
appears in the name box and name dialog.
this line will select the print area
sub somesubname()
Range("print_area").select
end sub
but i don't think that's what you want.

post back with more info.
regards
FSt1
"SteveDB1" wrote:

Hi all.
what would be involved in creating a macro that would read only the contents
of a worksheet within a pre-defined area of the print field?
Thank you.

Reply
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
error: "the copy area & the paste area are not the same size & sh Janis Excel Discussion (Misc queries) 1 September 7th 07 10:58 PM
Error handler if copy area different from paste area Paul S. Natanson Excel Programming 3 December 5th 06 02:00 AM
Any way to copy contents of print area with macro? uwajes Excel Programming 1 June 23rd 06 05:29 PM
Macro - Set Print Area for Changing Data Area ksp Excel Programming 5 May 15th 06 10:20 PM
Pivot Table macro to set print area and print details of drill down data Steve Haskins Excel Discussion (Misc queries) 2 December 28th 05 04:59 PM


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

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"