Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default 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
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
How do I use formulae to display a specific picture in a cell? Tricia Excel Discussion (Misc queries) 1 June 19th 08 10:50 PM
How to display a picture when a cell value changes Riddler Excel Programming 2 May 22nd 07 03:15 AM
Can you use a formula to automatically display a picture in a cell Suthey1 Excel Worksheet Functions 1 May 15th 07 06:32 AM
Picture in Cell of Active Sheet Sige Excel Programming 4 September 29th 05 05:35 PM
Display a picture depending on a value in a specified cell? Rakel Excel Programming 1 June 18th 04 07:38 PM


All times are GMT +1. The time now is 08:07 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"