Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Graphics Call With Macro - How to Exclude Some Pix?
I have a macro in a worksheet that works in conjunction with a VLOOKUP to
display pictures based on the VLOOKUP. The appropriate picture displays at the P16 cell location. My problem is when I put the macro in, it makes ALL my graphic objects (PICTURE) disappear except for the one the VLOOKUP calls for. How can I exclude some of the other graphic objects that are on the sheet? I tried renaming the objects and it still didn't work i.e.(Picture 100 to Pic 100 and also tried Obj 100). It know someway that it's a graphic. Here's the code I used: Private Sub Worksheet_Calculate() Dim oPic As Picture Me.Pictures.Visible = False With Range("P16") 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
Posted to microsoft.public.excel.programming
|
|||
|
|||
Graphics Call With Macro - How to Exclude Some Pix?
You have a response in .excel
DocuMike wrote: I have a macro in a worksheet that works in conjunction with a VLOOKUP to display pictures based on the VLOOKUP. The appropriate picture displays at the P16 cell location. My problem is when I put the macro in, it makes ALL my graphic objects (PICTURE) disappear except for the one the VLOOKUP calls for. How can I exclude some of the other graphic objects that are on the sheet? I tried renaming the objects and it still didn't work i.e.(Picture 100 to Pic 100 and also tried Obj 100). It know someway that it's a graphic. Here's the code I used: Private Sub Worksheet_Calculate() Dim oPic As Picture Me.Pictures.Visible = False With Range("P16") 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 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can run a macro ( call a macro) on selection of any filtercriteria? | Excel Worksheet Functions | |||
Call an Access macro from an Excel macro | Excel Discussion (Misc queries) | |||
Print macro to exclude a cell | Excel Discussion (Misc queries) | |||
Sort Macro to Exclude Blank Rows? | Excel Worksheet Functions | |||
Macro to exclude blank line and total column | Excel Programming |