![]() |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 10:37 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com