LordDragon
07-18-2015, 01:13 PM
Greetings,
I have an inventory DataList with over 1000 items. Some of them (about 900) have an image that can be accessed via a hyperlink. The problem is the hyperlink is attached to a small camera icon.
To make the list easier to use I've created several sheets for the items on the list that can pull the information about the items when the user enters the part number on their sheet.
The problem is the image with the hyperlink is not transferring to the sheets. Plus when I edit the DataList, the images have to be removed by individually if I delete a row with one. I'm also worried that the little images are going to end up not be lined up with their respective items.
So I'm thinking the easiest thing to do might be to get rid of the little camera icons and simply put a Yes or No in the DataList to identify if there is an image of the item available.
Now my problem is copying the hyperlink from the camera icon to the word "Yes" in each row that has an image.
I tried recording a macro, it looks like it copied fine, but I don't know how to make it work for each individual image.
Here is the recorded Macro.
Sub CopyHyperlink()
'Transfer the hyperlink from the image in column E to the word "Yes" in column F.
ActiveSheet.Shapes.Range(Array("ctl00_PageBodyContent_PartTypeListView_ctrl158_Image1")).Select
Selection.ShapeRange.Item(1).Hyperlink.Address = "(Address goes here.)"
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="Address copied here.", TextToDisplay:="Yes"
End Sub
Thanks.
I have an inventory DataList with over 1000 items. Some of them (about 900) have an image that can be accessed via a hyperlink. The problem is the hyperlink is attached to a small camera icon.
To make the list easier to use I've created several sheets for the items on the list that can pull the information about the items when the user enters the part number on their sheet.
The problem is the image with the hyperlink is not transferring to the sheets. Plus when I edit the DataList, the images have to be removed by individually if I delete a row with one. I'm also worried that the little images are going to end up not be lined up with their respective items.
So I'm thinking the easiest thing to do might be to get rid of the little camera icons and simply put a Yes or No in the DataList to identify if there is an image of the item available.
Now my problem is copying the hyperlink from the camera icon to the word "Yes" in each row that has an image.
I tried recording a macro, it looks like it copied fine, but I don't know how to make it work for each individual image.
Here is the recorded Macro.
Sub CopyHyperlink()
'Transfer the hyperlink from the image in column E to the word "Yes" in column F.
ActiveSheet.Shapes.Range(Array("ctl00_PageBodyContent_PartTypeListView_ctrl158_Image1")).Select
Selection.ShapeRange.Item(1).Hyperlink.Address = "(Address goes here.)"
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="Address copied here.", TextToDisplay:="Yes"
End Sub
Thanks.