ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Reference an image in another sheet (https://www.excelbanter.com/excel-programming/289805-reference-image-another-sheet.html)

Pete Csiszar[_2_]

Reference an image in another sheet
 
Hi All,

I need a little help referencing a GIF image on another another work sheet.
Basically what I'd like to do is have a UserForm display a GIF image that is
located in Sheet2

I've got a CommandButton in Sheet1 that opens UserForm1, which is setup for
an image but I'm having trouble getting the image Picture1 located in Sheet2
to display in the form.

I know it is an addressing issue but I'm not sure how to reference it.
If I was calling a GIF file with a path, this wouldn't be a problem.

TIA.

Pete



Doug Glancy

Reference an image in another sheet
 
Pete,

I'm assuming you need to load the picture at runtime. I struggled with the
same thing a few months ago and could not get the syntax. I tried something
like Image1.Picture = thisworkbook.worksheets("birds").shapes("birds1"), but
it didn't work, and nobody in this group responded with any syntax.
Somebody in this group suggested storing the images in the userform and
that's what I did. I put the images on the right side of the userform and
then set the right margin so that they were beyond it. Increased the size
of the file, but it worked.

hth,

Doug

If
"Pete Csiszar" wrote in message
news:RGFSb.6081$ft1.1153@clgrps12...
Hi All,

I need a little help referencing a GIF image on another another work

sheet.
Basically what I'd like to do is have a UserForm display a GIF image that

is
located in Sheet2

I've got a CommandButton in Sheet1 that opens UserForm1, which is setup

for
an image but I'm having trouble getting the image Picture1 located in

Sheet2
to display in the form.

I know it is an addressing issue but I'm not sure how to reference it.
If I was calling a GIF file with a path, this wouldn't be a problem.

TIA.

Pete





Pete Csiszar[_2_]

Reference an image in another sheet
 
Thanks for having a look Doug. You maybe right, I might have to store the
images in the UserForm.

Regards,
Pete

"Doug Glancy" wrote in message
...
Pete,

I'm assuming you need to load the picture at runtime. I struggled with

the
same thing a few months ago and could not get the syntax. I tried

something
like Image1.Picture = thisworkbook.worksheets("birds").shapes("birds1"),

but
it didn't work, and nobody in this group responded with any syntax.
Somebody in this group suggested storing the images in the userform and
that's what I did. I put the images on the right side of the userform and
then set the right margin so that they were beyond it. Increased the size
of the file, but it worked.

hth,

Doug

If
"Pete Csiszar" wrote in message
news:RGFSb.6081$ft1.1153@clgrps12...
Hi All,

I need a little help referencing a GIF image on another another work

sheet.
Basically what I'd like to do is have a UserForm display a GIF image

that
is
located in Sheet2

I've got a CommandButton in Sheet1 that opens UserForm1, which is setup

for
an image but I'm having trouble getting the image Picture1 located in

Sheet2
to display in the form.

I know it is an addressing issue but I'm not sure how to reference it.
If I was calling a GIF file with a path, this wouldn't be a problem.

TIA.

Pete







Robin Hammond[_2_]

Reference an image in another sheet
 
Pete,

I think you have two options.

1. copy the image into a graph, export the graph as a gif, import the gif
file back into your other workbook. There's something on j-walk about that
method.

2. use Stephen Bullen's paste picture routine. copy the image to the
clipboard from the first sheet, paste it back from the clipboard using paste
picture. It's a bit complicated at first, but it is massively faster and
more elegant.
http://www.bmsltd.co.uk/Excel/Default.htm

Robin Hammond
www.enhanceddatasystems.com

"Pete Csiszar" wrote in message
news:PRRSb.4581$Zi2.3162@edtnps84...
Thanks for having a look Doug. You maybe right, I might have to store the
images in the UserForm.

Regards,
Pete

"Doug Glancy" wrote in message
...
Pete,

I'm assuming you need to load the picture at runtime. I struggled with

the
same thing a few months ago and could not get the syntax. I tried

something
like Image1.Picture = thisworkbook.worksheets("birds").shapes("birds1"),

but
it didn't work, and nobody in this group responded with any syntax.
Somebody in this group suggested storing the images in the userform and
that's what I did. I put the images on the right side of the userform

and
then set the right margin so that they were beyond it. Increased the

size
of the file, but it worked.

hth,

Doug

If
"Pete Csiszar" wrote in message
news:RGFSb.6081$ft1.1153@clgrps12...
Hi All,

I need a little help referencing a GIF image on another another work

sheet.
Basically what I'd like to do is have a UserForm display a GIF image

that
is
located in Sheet2

I've got a CommandButton in Sheet1 that opens UserForm1, which is

setup
for
an image but I'm having trouble getting the image Picture1 located in

Sheet2
to display in the form.

I know it is an addressing issue but I'm not sure how to reference it.
If I was calling a GIF file with a path, this wouldn't be a problem.

TIA.

Pete










All times are GMT +1. The time now is 02:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com