L
Legacy 68581
Guest
Hello,
I am working on creating a map on which I will paste pictures in specific places.
The color of the pictures I paste will change according to the values I enter in my data sheet (to show to my coworkers which areas are doing better than others).
I have created a copy of the picture in each of the colors I will need, and named each picture (picturename1, picturename2 etc.).
I am trying to create a macro that will go to a cell that contains the picture name (here picturename1), copy that cell, go to the name box, paste the picture name, which will then select the picture, go to a cell I choose and paste it there.
This works, but when I change the data in my data sheet and the information in cell F4 is automatically updated to 'picturename2', the macro keeps on pasting picturename1.
Could somebody please tell me how to replace:
by a code that would say 'go to name box and paste clipboard contents, enter'?
This seems so simple, yet after hours of browsing I still haven't found the answer... please help!
Thanks,
matten
I am working on creating a map on which I will paste pictures in specific places.
The color of the pictures I paste will change according to the values I enter in my data sheet (to show to my coworkers which areas are doing better than others).
I have created a copy of the picture in each of the colors I will need, and named each picture (picturename1, picturename2 etc.).
I am trying to create a macro that will go to a cell that contains the picture name (here picturename1), copy that cell, go to the name box, paste the picture name, which will then select the picture, go to a cell I choose and paste it there.
Code:
Sub copypicture()
'
' copypicture Macro
' Macro recorded 29/09/2006 by matten
'
'
Range("F4").Select
Selection.Copy
ActiveSheet.Shapes("picturename1").Select
Application.CutCopyMode = False
Selection.Copy
Range("K2").Select
ActiveSheet.Paste
End Sub
This works, but when I change the data in my data sheet and the information in cell F4 is automatically updated to 'picturename2', the macro keeps on pasting picturename1.
Could somebody please tell me how to replace:
Code:
ActiveSheet.Shapes("picturename1").Select
This seems so simple, yet after hours of browsing I still haven't found the answer... please help!
Thanks,
matten