Hi Frank,
I think my problem is simpler than you imagine...
I have [workbook1]worksheet1 that has a picture on it. What I'm trying to do
is copy that picture to [workbook2]worksheet2.
If I was doing this manually I would simply select the picture on the source
worksheet and go edit->copy. Then select the cell where I wanted the picture
to go on the destination worksheet and again Edit-> Paste.
The problem is how to do this in a macro? I think it's something like
this....
Dim Pic As Picture
Pic = [WorkBook1].WorkSheet1!Pictures("Picture 1").copy
ActiveSheet.Pictures.Insert(Pic).Select
But line 2 gives me an error about "needing an object"
Colin
Frank Kabel said:
Hi
what do you mean with 'image of the worksheet'?
--
Regards
Frank Kabel
Frankfurt, Germany
Sorry i think I need a bit more help... What I'm actually trying to
do is
write a macro to copy an image from one workbook/sheet to a cell on
the
cutrrent workbook/sheet
How do I select the image on the source workbook/sheet?
Is there something like...
[workbook1]worksheet!.image.copy destination=activecell
I'm trying to run before I can walk!
Colin
Thanks frank I'll give it a try.
Colin
Hi
normally no need at all for select / activate.
use something like
worksheets("sheet2").range("A1:A100").copy _
destination:=worksheets("sheet1").range("A1:A100")
--
Regards
Frank Kabel
Frankfurt, Germany
I'm trying to make a macro that copies a few lines from
worksheet1
into the
current worksheet2. The problem is that the name of worksheet2
can
change so
I can't use
Windows("worksheet2").Activate
to return the focus before doing a paste.
How do I do this please?