Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default VBA on vlookup picture.

hi according to the below link method, how can i use the picture again for
another cell range? and if both cell range input is same. how can i display
two same picture with my picture data?


http://www.mcgimpsey.com/excel/lookuppics.html


Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("F1")
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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default VBA on vlookup picture.

Yesterday when you posted the same question, Dave P gave you some revised
code.

You said it worked, but I tried it and could get different pictures to
display by adding another DV dropdown to A3 and a VLOOKUP formula in H9, but
not the same picture in both F1 and H9.

Is that the problem you are having?

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

Alows for more than one picture(or same picture multiple times) to be
displayed based upon a value or item chosen from DV lists

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

DV0049 - ClipArt Selection

Edit the code to suit.


Gord Dibben MS Excel MVP

On Thu, 6 Nov 2008 08:24:00 -0800, Oligo wrote:

hi according to the below link method, how can i use the picture again for
another cell range? and if both cell range input is same. how can i display
two same picture with my picture data?


http://www.mcgimpsey.com/excel/lookuppics.html


Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("F1")
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


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default VBA on vlookup picture.

yap. you are right, Gord. that's my problem. i just want to make my
spreadsheet display the same image to cover up the formula.
so any suggestion?


"Gord Dibben" wrote:

Yesterday when you posted the same question, Dave P gave you some revised
code.

You said it worked, but I tried it and could get different pictures to
display by adding another DV dropdown to A3 and a VLOOKUP formula in H9, but
not the same picture in both F1 and H9.

Is that the problem you are having?

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

Alows for more than one picture(or same picture multiple times) to be
displayed based upon a value or item chosen from DV lists

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

DV0049 - ClipArt Selection

Edit the code to suit.


Gord Dibben MS Excel MVP

On Thu, 6 Nov 2008 08:24:00 -0800, Oligo wrote:

hi according to the below link method, how can i use the picture again for
another cell range? and if both cell range input is same. how can i display
two same picture with my picture data?


http://www.mcgimpsey.com/excel/lookuppics.html


Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("F1")
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



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default VBA on vlookup picture.

Download Bernie's workbook and adjust to suit.


Gord


On Sat, 8 Nov 2008 02:16:00 -0800, Oligo wrote:

yap. you are right, Gord. that's my problem. i just want to make my
spreadsheet display the same image to cover up the formula.
so any suggestion?


"Gord Dibben" wrote:

Yesterday when you posted the same question, Dave P gave you some revised
code.

You said it worked, but I tried it and could get different pictures to
display by adding another DV dropdown to A3 and a VLOOKUP formula in H9, but
not the same picture in both F1 and H9.

Is that the problem you are having?

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

Alows for more than one picture(or same picture multiple times) to be
displayed based upon a value or item chosen from DV lists

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

DV0049 - ClipArt Selection

Edit the code to suit.


Gord Dibben MS Excel MVP

On Thu, 6 Nov 2008 08:24:00 -0800, Oligo wrote:

hi according to the below link method, how can i use the picture again for
another cell range? and if both cell range input is same. how can i display
two same picture with my picture data?


http://www.mcgimpsey.com/excel/lookuppics.html


Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("F1")
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




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
can you use VLOOKUP TO PRINT A PICTURE Russell-stanely Excel Discussion (Misc queries) 4 July 25th 07 11:41 PM
how do I insert picture into cell so vlookup can return picture? ah Excel Worksheet Functions 1 May 1st 07 04:38 AM
Can you use a vlookup to bring in a picture? Marlsnz Excel Discussion (Misc queries) 1 June 2nd 06 01:59 AM
VLOOKUP- use a picture honyacker Excel Discussion (Misc queries) 3 April 28th 06 07:31 PM
vlookup and picture youth Excel Discussion (Misc queries) 2 October 16th 05 07:01 PM


All times are GMT +1. The time now is 11:50 AM.

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"