I am tring to write a macro that opens a sheet and copies cell from it
to my original sheet. The copied cells are in the same place on the
sheet, but the thing is, the name of the sheet changes. I guess what
I'm asking is is there a way to have it prompt me for the name of the
sheet I'm going to copy from?
Thanks,
Peter
Gary''s Student - 23 Jan 2006 00:37 GMT
Try:
Option Explicit
Sub CopyFromPasteTo()
Dim strF As String
Dim strT As String
Dim rngF As Range
Dim rngT As Range
strF = Application.InputBox("Enter from range", Type:=2)
Set rngF = Range(strF)
strT = Application.InputBox("Enter goto range", Type:=2)
Set rngT = Range(strT)
rngF.Copy rngT
End Sub

Signature
Gary''s Student
> I am tring to write a macro that opens a sheet and copies cell from it
> to my original sheet. The copied cells are in the same place on the
[quoted text clipped - 5 lines]
>
> Peter
peter - 23 Jan 2006 23:59 GMT
Ok, Gary, I'll give it a try at work tomorrow.
Thanks a lot!
Peter