Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Insert Images Using Conditional Format (Many)

¡Hello!

I am quite new into VBA, and I need some help from knowledgeable users.

My Question, before I start explaining is:
¿How can I insert multiple conditional images in the same spreadsheet, that
react to the value in different cells?

Explanation:
I have a small Excel File, used to compare different features between two
products, in two columns. You pick the product in a Validated Cell (drop down
box) on the top of the column, and all the information about that product is
filled down using conditional formatting. I inserted function to also display
a pic of the product in that column, using the code:

Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("B8")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With
End Sub

It worked quite well with one image...But, when I tried to apply the a
second code for the second product column in the same Sheet, I found out that
the first code (Set to Me.Pictures.Visible=False) hid the pictures that the
second code attempted to display. (Or that is my guess).

¿How can I insert multiple conditional images in the same spreadsheet, that
react to the value in different cells?

¡Any help would be greatly appreciated!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,118
Default Insert Images Using Conditional Format (Many)

Here are two options:

If you want to read the pictures from a folder:
http://www.contextures.com/excelfiles.html#CH0003

or....if you want to store the pictures in the Excel workbook:
http://www.mcgimpsey.com/excel/lookuppics.html

Is that something you can work with?
Post back if you have more questions.
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)



"Mike Garcia" <Mike wrote in message
...
¡Hello!

I am quite new into VBA, and I need some help from knowledgeable users.

My Question, before I start explaining is:
¿How can I insert multiple conditional images in the same spreadsheet,
that
react to the value in different cells?

Explanation:
I have a small Excel File, used to compare different features between two
products, in two columns. You pick the product in a Validated Cell (drop
down
box) on the top of the column, and all the information about that product
is
filled down using conditional formatting. I inserted function to also
display
a pic of the product in that column, using the code:

Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("B8")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With
End Sub

It worked quite well with one image...But, when I tried to apply the a
second code for the second product column in the same Sheet, I found out
that
the first code (Set to Me.Pictures.Visible=False) hid the pictures that
the
second code attempted to display. (Or that is my guess).

¿How can I insert multiple conditional images in the same spreadsheet,
that
react to the value in different cells?

¡Any help would be greatly appreciated!



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Insert Images Using Conditional Format (Many)

Looks to me like the posted code is from John's lookuppics.xls which allows for
only one image.

Here is a third option.

Got to Debra Dalgeish's site for a sample workbook from Bernie Dietrick for
adding pictures via selections.

Allows for more than one picture to be displayed on a sheet.

http://www.contextures.on.ca/excelfiles.html#DataVal

DV0049 - ClipArt Selection


Gord Dibben MS Excel MVP



On Wed, 3 Oct 2007 19:07:47 -0400, "Ron Coderre"
wrote:

Here are two options:

If you want to read the pictures from a folder:
http://www.contextures.com/excelfiles.html#CH0003

or....if you want to store the pictures in the Excel workbook:
http://www.mcgimpsey.com/excel/lookuppics.html

Is that something you can work with?
Post back if you have more questions.
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)



"Mike Garcia" <Mike wrote in message
...
¡Hello!

I am quite new into VBA, and I need some help from knowledgeable users.

My Question, before I start explaining is:
¿How can I insert multiple conditional images in the same spreadsheet,
that
react to the value in different cells?

Explanation:
I have a small Excel File, used to compare different features between two
products, in two columns. You pick the product in a Validated Cell (drop
down
box) on the top of the column, and all the information about that product
is
filled down using conditional formatting. I inserted function to also
display
a pic of the product in that column, using the code:

Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("B8")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With
End Sub

It worked quite well with one image...But, when I tried to apply the a
second code for the second product column in the same Sheet, I found out
that
the first code (Set to Me.Pictures.Visible=False) hid the pictures that
the
second code attempted to display. (Or that is my guess).

¿How can I insert multiple conditional images in the same spreadsheet,
that
react to the value in different cells?

¡Any help would be greatly appreciated!



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Insert Images Using Conditional Format (Many)

Before anything else, please let me thank Ron and Gord for their incredibly
quick response, both were incredibly helpful.

As a matter of fact, I need to include the pictures inside the file since it
will work as a tool for our salesforce, so we have to send just one file
without too many instructions...

I will try Bernie Dietrick's file, as it lets add many images, and display
them conditionally at the same time. Thanks again for all the resources
provided.

Have a great week!

"Gord Dibben" wrote:

Looks to me like the posted code is from John's lookuppics.xls which allows for
only one image.

Here is a third option.

Got to Debra Dalgeish's site for a sample workbook from Bernie Dietrick for
adding pictures via selections.

Allows for more than one picture to be displayed on a sheet.

http://www.contextures.on.ca/excelfiles.html#DataVal

DV0049 - ClipArt Selection


Gord Dibben MS Excel MVP



On Wed, 3 Oct 2007 19:07:47 -0400, "Ron Coderre"
wrote:

Here are two options:

If you want to read the pictures from a folder:
http://www.contextures.com/excelfiles.html#CH0003

or....if you want to store the pictures in the Excel workbook:
http://www.mcgimpsey.com/excel/lookuppics.html

Is that something you can work with?
Post back if you have more questions.
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)



"Mike Garcia" <Mike wrote in message
...
¡Hello!

I am quite new into VBA, and I need some help from knowledgeable users.

My Question, before I start explaining is:
¿How can I insert multiple conditional images in the same spreadsheet,
that
react to the value in different cells?

Explanation:
I have a small Excel File, used to compare different features between two
products, in two columns. You pick the product in a Validated Cell (drop
down
box) on the top of the column, and all the information about that product
is
filled down using conditional formatting. I inserted function to also
display
a pic of the product in that column, using the code:

Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("B8")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With
End Sub

It worked quite well with one image...But, when I tried to apply the a
second code for the second product column in the same Sheet, I found out
that
the first code (Set to Me.Pictures.Visible=False) hid the pictures that
the
second code attempted to display. (Or that is my guess).

¿How can I insert multiple conditional images in the same spreadsheet,
that
react to the value in different cells?

¡Any help would be greatly appreciated!




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Insert Images Using Conditional Format (Many)

Mike

With Bernie's method the images are inserted into and saved with the workbook.

Just insert them into an out of the way area in the worksheet from where they
will be called up in response to the conditions.


Gord

On Thu, 4 Oct 2007 07:04:02 -0700, Mike Garcia
wrote:

Before anything else, please let me thank Ron and Gord for their incredibly
quick response, both were incredibly helpful.

As a matter of fact, I need to include the pictures inside the file since it
will work as a tool for our salesforce, so we have to send just one file
without too many instructions...

I will try Bernie Dietrick's file, as it lets add many images, and display
them conditionally at the same time. Thanks again for all the resources
provided.

Have a great week!

"Gord Dibben" wrote:

Looks to me like the posted code is from John's lookuppics.xls which allows for
only one image.

Here is a third option.

Got to Debra Dalgeish's site for a sample workbook from Bernie Dietrick for
adding pictures via selections.

Allows for more than one picture to be displayed on a sheet.

http://www.contextures.on.ca/excelfiles.html#DataVal

DV0049 - ClipArt Selection


Gord Dibben MS Excel MVP



On Wed, 3 Oct 2007 19:07:47 -0400, "Ron Coderre"
wrote:

Here are two options:

If you want to read the pictures from a folder:
http://www.contextures.com/excelfiles.html#CH0003

or....if you want to store the pictures in the Excel workbook:
http://www.mcgimpsey.com/excel/lookuppics.html

Is that something you can work with?
Post back if you have more questions.
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)



"Mike Garcia" <Mike wrote in message
...
¡Hello!

I am quite new into VBA, and I need some help from knowledgeable users.

My Question, before I start explaining is:
¿How can I insert multiple conditional images in the same spreadsheet,
that
react to the value in different cells?

Explanation:
I have a small Excel File, used to compare different features between two
products, in two columns. You pick the product in a Validated Cell (drop
down
box) on the top of the column, and all the information about that product
is
filled down using conditional formatting. I inserted function to also
display
a pic of the product in that column, using the code:

Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("B8")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With
End Sub

It worked quite well with one image...But, when I tried to apply the a
second code for the second product column in the same Sheet, I found out
that
the first code (Set to Me.Pictures.Visible=False) hid the pictures that
the
second code attempted to display. (Or that is my guess).

¿How can I insert multiple conditional images in the same spreadsheet,
that
react to the value in different cells?

¡Any help would be greatly appreciated!




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 images in a protected worksheet kub Excel Worksheet Functions 10 July 28th 07 11:31 AM
Conditional Format - Format Transfer To Chart ju1eshart Excel Discussion (Misc queries) 0 June 1st 06 02:46 PM
I want glitter images to insert rita New Users to Excel 1 February 27th 06 10:00 PM
Printing conditional images Trav Excel Discussion (Misc queries) 6 January 12th 06 02:46 AM
copy conditional format as ACTUAL format Dana Zulager Excel Discussion (Misc queries) 7 December 7th 04 11:02 PM


All times are GMT +1. The time now is 04:32 PM.

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

About Us

"It's about Microsoft Excel"