Insert a picture from another worksheet

sparky2205

Active Member
Joined
Feb 6, 2013
Messages
350
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi folks,
I've inherited a spreadsheet that now requires changes.
The spreadsheet has a macro to update Pictograms based on a description that is populated earlier in the code.
Currently it is set up to populate the pictograms from a network location. I want to change this so that the pictograms are instead stored within the spreadsheet on a tab called "Pictograms".
Apologies for variable names in advance as the original spreadsheet is German.

What I currently have:
VBA Code:
Set BILD = ActiveSheet.Pictures.Insert(ADRESSE + BEZEICHNUNG + ".png")
BILD is declared as a Picture
ADRESSE is a String to hold the network address
BEZEICHNUNG is a string to hold the picture name (i.e.pictogram name)

What I'm trying to achieve:
VBA Code:
Set BILD = ActiveSheet.Pictures.Insert(Worksheets("Pictograms").shapes(BEZEICHNUNG)

This is in a loop which updates BEZEICHNUNG each time through the loop and inserts the appropriate picture.

This is producing a compile error: Expected: list separator or )
 

GWteB

Well-known Member
Joined
Sep 10, 2010
Messages
2,442
Office Version
  1. 2013
Platform
  1. Windows
I meant the "from scratch" part...
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

sparky2205

Active Member
Joined
Feb 6, 2013
Messages
350
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Everything looks fine now GWteB.
I have an independent tester looking at it as well but I gave it a thorough check myself today and all looks well.

I can't thank you enough for sticking with me on this.
I still have some homework to do to fully understand the code but I have a working spreadsheet and now I can do that homework when I'm not under pressure.

Thanks again.
 

GWteB

Well-known Member
Joined
Sep 10, 2010
Messages
2,442
Office Version
  1. 2013
Platform
  1. Windows
My pleasure :)
Glad it's sorted and thanks for letting me know.
 

Forum statistics

Threads
1,148,020
Messages
5,744,364
Members
423,864
Latest member
GolfingTitan116

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
Top