Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 55
Default Insert picture from file (Need VBA help)

Hi folks!

I stumbled across this:
http://www.contextures.on.ca/ShowFilePicsDemo.zip

Which will allow you to insert graphics into a defined area based on
data from a drop-down box. (I'm using Excel 2003)

I would REALLY like to get this to work with my current project, but
my drop-down list and graphics are on two separate worksheets in the
same file.

Can anyone offer some VBA advice on how to make this happen? I
understand it on a kindergarten level. ;)

Many thanks!!!
Craig
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,073
Default Insert picture from file (Need VBA help)

On Jul 31, 7:41 am, TheMilkGuy wrote:
Hi folks!

I stumbled across this:http://www.contextures.on.ca/ShowFilePicsDemo.zip

Which will allow you to insert graphics into a defined area based on
data from a drop-down box. (I'm using Excel 2003)

I would REALLY like to get this to work with my current project, but
my drop-down list and graphics are on two separate worksheets in the
same file.

Can anyone offer some VBA advice on how to make this happen? I
understand it on a kindergarten level. ;)

Many thanks!!!
Craig


Hi Craig,

I downloaded the link then did the following to get the picture
displayed on a different sheet...

1. Inserted a new sheet which was automatically named Sheet1.
2. Went Insert|Name|Define... to bring up the Define Name dialog.
3. Clicked on rngPicDisplayCells in the list of defined names. The
refers to: box then showed the formula...

=ShowFilePicsDemo!$D$6:$D$10

which I changed to...

=Sheet1!$D$6:$D$10

so that the picture would appear on the new sheet, Sheet1, at the same
location ($D$6:$D$10).

After making that change to the Refers to: formula for
rngPicDisplayCells, I then clicked the Add button then OK.

4. I then right clicked the ShowFilePicsDemo sheet tab and selected
View code from the pop up to get into that worksheet's code module.
In the code module I changed the following line...

rDestCells:=Range("rngPicDisplayCells"), _

to...

rDestCells:=Worksheets("Sheet1").Range("rngPicDisp layCells"), _

5. Saved the changes then exited the VBA Editor.

After those changes were made the picture whose name was selected from
the drop down on the ShowFilePicsDemo sheet appeared in $D$6:$D$10 on
Sheet1.

Ken Johnson

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 55
Default Insert picture from file (Need VBA help)

Outstanding Ken!

You're a rock star... Worked like a charm.

Cheers,
Craig

On Jul 30, 6:01 pm, Ken Johnson wrote:
On Jul 31, 7:41 am, TheMilkGuy wrote:



Hi folks!


I stumbled across this:http://www.contextures.on.ca/ShowFilePicsDemo.zip


Which will allow you to insert graphics into a defined area based on
data from a drop-down box. (I'm using Excel 2003)


I would REALLY like to get this to work with my current project, but
my drop-down list and graphics are on two separate worksheets in the
same file.


Can anyone offer some VBA advice on how to make this happen? I
understand it on a kindergarten level. ;)


Many thanks!!!
Craig


Hi Craig,

I downloaded the link then did the following to get the picture
displayed on a different sheet...

1. Inserted a new sheet which was automatically named Sheet1.
2. Went Insert|Name|Define... to bring up the Define Name dialog.
3. Clicked on rngPicDisplayCells in the list of defined names. The
refers to: box then showed the formula...

=ShowFilePicsDemo!$D$6:$D$10

which I changed to...

=Sheet1!$D$6:$D$10

so that the picture would appear on the new sheet, Sheet1, at the same
location ($D$6:$D$10).

After making that change to the Refers to: formula for
rngPicDisplayCells, I then clicked the Add button then OK.

4. I then right clicked the ShowFilePicsDemo sheet tab and selected
View code from the pop up to get into that worksheet's code module.
In the code module I changed the following line...

rDestCells:=Range("rngPicDisplayCells"), _

to...

rDestCells:=Worksheets("Sheet1").Range("rngPicDisp layCells"), _

5. Saved the changes then exited the VBA Editor.

After those changes were made the picture whose name was selected from
the drop down on the ShowFilePicsDemo sheet appeared in $D$6:$D$10 on
Sheet1.

Ken Johnson


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,073
Default Insert picture from file (Need VBA help)

On Jul 31, 1:37 pm, TheMilkGuy wrote:
Outstanding Ken!

You're a rock star... Worked like a charm.

Cheers,
Craig

On Jul 30, 6:01 pm, Ken Johnson wrote:

On Jul 31, 7:41 am, TheMilkGuy wrote:


Hi folks!


I stumbled across this:http://www.contextures.on.ca/ShowFilePicsDemo.zip


Which will allow you to insert graphics into a defined area based on
data from a drop-down box. (I'm using Excel 2003)


I would REALLY like to get this to work with my current project, but
my drop-down list and graphics are on two separate worksheets in the
same file.


Can anyone offer some VBA advice on how to make this happen? I
understand it on a kindergarten level. ;)


Many thanks!!!
Craig


Hi Craig,


I downloaded the link then did the following to get the picture
displayed on a different sheet...


1. Inserted a new sheet which was automatically named Sheet1.
2. Went Insert|Name|Define... to bring up the Define Name dialog.
3. Clicked on rngPicDisplayCells in the list of defined names. The
refers to: box then showed the formula...


=ShowFilePicsDemo!$D$6:$D$10


which I changed to...


=Sheet1!$D$6:$D$10


so that the picture would appear on the new sheet, Sheet1, at the same
location ($D$6:$D$10).


After making that change to the Refers to: formula for
rngPicDisplayCells, I then clicked the Add button then OK.


4. I then right clicked the ShowFilePicsDemo sheet tab and selected
View code from the pop up to get into that worksheet's code module.
In the code module I changed the following line...


rDestCells:=Range("rngPicDisplayCells"), _


to...


rDestCells:=Worksheets("Sheet1").Range("rngPicDisp layCells"), _


5. Saved the changes then exited the VBA Editor.


After those changes were made the picture whose name was selected from
the drop down on the ShowFilePicsDemo sheet appeared in $D$6:$D$10 on
Sheet1.


Ken Johnson


Great!
Thanks for the feedback.

Ken Johnson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
insert a picture in to a comment but picture not save on hard disk Pablo Excel Discussion (Misc queries) 0 February 21st 07 03:48 PM
Can I insert a link to picture that refreshes when image file cha Buzz Burhans Excel Discussion (Misc queries) 1 October 12th 06 06:12 PM
how can you insert a picture in a protected excel file ylolo Excel Worksheet Functions 0 September 13th 06 10:18 PM
insert picture from file based on cel value/content Jamaican Teacher Excel Worksheet Functions 1 June 8th 06 06:27 PM
How can I insert a picture from file while worksheet is protected ChrisYH Excel Discussion (Misc queries) 0 July 27th 05 04:25 AM


All times are GMT +1. The time now is 03:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"