needVBAH3lpplease
New Member
- Joined
- Dec 11, 2014
- Messages
- 2
I have a interesting one i hope you can help me with.
I have audit documents that contain a column with a photos filename
ie.
<tbody>
</tbody>
The file name relates to a file one subfolder belong the current workbooks path
I need a VB script that will look one subfolder below the folder the current workbook resides, and hyperlink to the file with the same filename as the selected cell /cells.
For instance.
I select cells A1 and A2 (WIN_20141125_10.jpg and WIN_20141125_15.jpg), and want the macro to search in "currentworkbook.path\photos" for the corresponding filenames, and change the text in cells A1 and A2 into hyperlinks to the files, keeping the same text.
The reason this is required, is because multiple of the same excel documents are recieved each month, and all need to have hundreds of hyperlinks setup in the document. The workbook location isn't always going to be the same, but the photos are always going to be in a subfolder called "photos" in the workbooks location.
I know very little about VB scripting, but im sure this must be possible- Please help!!
I have audit documents that contain a column with a photos filename
ie.
WIN_20141125_10.JPG |
WIN_20141125_15.JPG |
WIN_20141125_155.JPG |
WIN_20141125_44.JPG |
WIN_20141125_12.JPG |
<tbody>
</tbody>
The file name relates to a file one subfolder belong the current workbooks path
I need a VB script that will look one subfolder below the folder the current workbook resides, and hyperlink to the file with the same filename as the selected cell /cells.
For instance.
I select cells A1 and A2 (WIN_20141125_10.jpg and WIN_20141125_15.jpg), and want the macro to search in "currentworkbook.path\photos" for the corresponding filenames, and change the text in cells A1 and A2 into hyperlinks to the files, keeping the same text.
The reason this is required, is because multiple of the same excel documents are recieved each month, and all need to have hundreds of hyperlinks setup in the document. The workbook location isn't always going to be the same, but the photos are always going to be in a subfolder called "photos" in the workbooks location.
I know very little about VB scripting, but im sure this must be possible- Please help!!