Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy from active sheet only 1

Status
Not open for further replies.

wanttoobe

Technical User
Feb 20, 2004
3
US
I have a sheet for each month. At the end of the month I want to copy a range to another sheet for printing.
I'd like to do this via script so that what ever sheet is active will have that range copied. Is there anything like Excel's ActiveSheet?

I looked in FAQ and did a Keyword Search, either I don't know how to ask or it isn't there.

Thanks
 
I'm sure there is a script equivalent.

In a macro you can access the formula:

@CELLPOINTER("sheet")

or

@CELLPOINTER("sheetname")

One possible implementation:

{EDIT-QUICK-COPY dest;+@CELLPOINTER("sheetname")&":A1.."&@CELLPOINTER("sheetname")&":B6"}

 
Thanks much I was unable to get it to work. But I probably inserted it wrong.

[Window 2].Activate
[Feb04:A5].Select
Selection.Reshape [Feb04:A5..Feb04:O32]
Selection.CopyToClipboard

I want Feb04 (the sheet name) to be whatever the active sheet name is ie: Mar04, Apr04, May04 etc.

Thanks Again
 
I think I got it.
By deleting the sheet name and only using the range address seems to work. I tried it on a couple of months, if it blows up next month I'll be back.
Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top