View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Colinhp Colinhp is offline
external usenet poster
 
Posts: 13
Default Including images in a tab order sequence.

That worked a treat.
Thank you for your help.

"NickHK" wrote:

You cannot attach a graphic to a cell, but..
Assuming that after cell D7 you wish to select a grphic called "Picture1" :

Const CellJumpToGraphic As String = "$D$7"
Dim LastCell As Range

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not LastCell Is Nothing Then
If LastCell.Address = CellJumpToGraphic Then
Shapes("Picture1").Select
End If
End If
Set LastCell = Target
End Sub

But you need to make sure the WS is protected without the Objects option
checked and .EnableSelection is set to xlUnlocked cells.

NickHK

"Colinhp" ...
Hi,

Thanks for your reply.
What I would like to do is 'attach' the image somehow to a cell which I
could then unprotect and the tab sequence would presumably include this
cell
in its sequence when the user pressed the tab key.
Is it possible to 'attach' the image to the cell in this way, and if so
how
do I do it?

Thank you.

"Halim" wrote:

Hi,

Try to use :

While your sheet protected run it:
Sub EnableTab()
Application.OnKey "{tab}", "EnabTAB"
End Sub

Sub EnabTAB()
If ActiveCell.Column < 256 Then ActiveCell.Offset(0, 1).Select
End Sub

--

Regards,

Halim


"Colinhp" wrote:

I have a protected worksheet with only four cells and an image that the
user
can select with their mouse.
I want keyboard users to be able to select these same items without a
mouse.
They can move between the four cells easily enough by pressing the tab
key,
but how do I get the image included in the tab sequence?
Thank you.