-1

I am new to VBA excel . I need a your valuable suggestions how to link images directly to excel.

Example:

I have Coloumn "D" which has information
Apple
samsung
Nokia
Blackberry

I have a images in a folder with "Nokia.jpeg", "Apple.Jpeg", "Samsung.jpeg"

How I can update automatically link those image to my column names. I have more than 1000 images. Its taking to much time linking manually , Is there any way to link the folder path with corresponding name with column name.

Community
  • 1
  • 1
user2965711
  • 77
  • 1
  • 9
  • Its not duplicate, I need the string to match with corrosponding image name, Then link the image. – user2965711 Apr 17 '16 at 09:35
  • You can write a macro to do that. Or if you can't write macros, you can hire a professional. If you don't want to spend money, you can try to learn VBA. Anyway, come back here when you have tried something and got stuck, we will gladly help. But we won't do your job for you. – vacip Apr 17 '16 at 10:05
  • If you take that code as is, it will do what you want, provided your [current directory](http://stackoverflow.com/a/5944101/11683) is the one with images. Otherwise you will need to go through the effort of prepending the directory name to `url_column.Cells(i).Value`. Hence it is an exact duplicate. – GSerg Apr 17 '16 at 12:05
  • @vacip I didnt ask for making the job, need a suggestions how to do it. I am IOS programmer for 7 years. I just started programming for excel just for my interest – user2965711 Apr 17 '16 at 15:51

1 Answers1

0
myDir = "xxxxx"
t = ".JPG"
 Copystr1=Worksheet.Cells(i, 8).value 
Worksheets.Hyperlinks.Add Anchor:=Cells(i, 8), Address:=myDir & Copystr1 & t, TextToDisplay:=Copystr1

@vacip just for you , its just a matter of help.

user2965711
  • 77
  • 1
  • 9
  • Funny you should say that. :) I did my part in helping out here if you check my answer history, but I refuse to do free freelance work on questions with no display of effort. But hey... Put your time where your mouth is, and go answer a few questions! Hmm? – vacip May 31 '16 at 11:04