Adding a picture to cell with a only having a part of the file name

ServerDude

New Member
Joined
Mar 31, 2011
Messages
30
Hi,

Thanks in advance for your help.

I have created a job sheet which requires a previously captured signature to be added to the bottom as a proof of completion. The .jpg name is made of the date, the engineer, the job number and the word signature with hyphens separating them. I have so far managed to import the picture and place it where needed when i manually insert the job number into the VBA script. What i would like to do is use the Job No that has already been returned by the query. I am happy to either use the cell reference of the variable already created earlier in the script. The issue i am having is on the following part of the script.

ActiveSheet.Pictures.Delete
Sigfile = Dir$("\\dc01\Server VFP Static and Dynamic\Images" & "*JobNo*" & ".*")
SigLoca = ("\\dc01\Server VFP Static and Dynamic\Images")
Range("C40:G47").Select
ActiveSheet.Pictures.Insert(SigLoca & Sigfile).Select

both sigfile & sigloca return data when the "JobNo" is a physical number like "000035521". The variable "JobNo" works earlier on in the script, i just cant get it to work in this line above.

I have tried adding parenthesis but to no avail.

Kind Regards
Jason Boull
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Forum statistics

Threads
1,224,852
Messages
6,181,404
Members
453,036
Latest member
Koyaanisqatsi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top