Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display picture according to active cell
Dear Excel 2007 Experts:
The following code works fine in my application: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim rngInter As Range If Target.Cells.Count = 1 Then Set rngInter = Intersect(Range("SchedulingBlocks"), Target) 'SchedulingBlocks is range E5:AB555 If Not rngInter Is Nothing Then 'Check current contents If Target.Formula < "1" Then Target.Value = 1 Else Target.Formula = "=INPUT!" & Target.Offset(, 4).Address End If End If End If End Sub The code above mimics the behavior of a checkbox in cells E5:AB555. When one of the cells in the range is selected, it fills the selected cell with the value 1 or else it fills a formula. OBJECTIVE: Insert additional lines that will accommodate the following: ’ I have 24 dynamic pictures taken by the camera feature of excel 2007. ’ Each picture should represent one of the 24 columns E to AB. ’ Possible user scenario 1: When the selected cell is in column E, the code should display Picture 001. ’ Possible user scenario 2: When the selected cell is in column F, the code should display Picture 002. ’ Possible user scenario 3: When the selected cell is in column AB, the code should display Picture 024. ’ This should also be true to the rest of the columns like G for Picture 003, H for Picture 004, I for Picture 005 and so on¦ ’ All 24 pictures will only display in one the same spot, displaying only the corresponding picture of the column where the selected/active cell is. Please help. Thank you very much, Omega |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I use formulae to display a specific picture in a cell? | Excel Discussion (Misc queries) | |||
How to display a picture when a cell value changes | Excel Programming | |||
Can you use a formula to automatically display a picture in a cell | Excel Worksheet Functions | |||
Picture in Cell of Active Sheet | Excel Programming | |||
Display a picture depending on a value in a specified cell? | Excel Programming |