Excel VBA Code to Open Images on other computers

acool

Board Regular
Joined
Feb 10, 2023
Messages
121
Office Version
  1. 365
Platform
  1. Windows
Hi Everyone,

I am currently trying to create an excel VBA macro that populates the company logo after running it each time. The png image is stored in a shared folder and is accessible to everyone. I have no issues populating the image on my own laptop, however it becomes an issue when others try to run the macro on their own computers. To make code functional for everyone, I tried removing my personal user name in hopes that this would do the trick, however, I'm still receiving an error. Below is photo of the the code that properly runs (top), and the code that I changed it to which I am having issues with. if anyone knows of a fix and is able to share, that would be greatly appreciated. Thank You!

1687874496759.png
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
What comes after the \\ needs to be the server name. Since you also use "Company" where you used C: I'm guessing that is not the server name. What you might want to lookup is UNC path syntax. Not sure if that will solve your issue because saying you're having issues doesn't give anyone much to go on.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,333
Members
452,636
Latest member
laura12345

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