Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
error: "the copy area & the paste area are not the same size & sh | Excel Discussion (Misc queries) | |||
Error handler if copy area different from paste area | Excel Programming | |||
Any way to copy contents of print area with macro? | Excel Programming | |||
Macro - Set Print Area for Changing Data Area | Excel Programming | |||
Pivot Table macro to set print area and print details of drill down data | Excel Discussion (Misc queries) |