Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Including images in a tab order sequence.
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Including images in a tab order sequence.
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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Including images in a tab order sequence.
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. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Including images in a tab order sequence.
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. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Including images in a tab order sequence.
If your sheet protection includes 'Locked' objects you won't be able to
select them with any method. Otherwise you could select all objects from F5 (or ctrl-G) Special Objects then tab between them, then Esc to re-activate the last cell selection. Regards, Peter T "Colinhp" wrote in message ... 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to select values in sequence order? | Excel Discussion (Misc queries) | |||
Formula that selects value from list in sequence order | Excel Discussion (Misc queries) | |||
2 part macro question (sequence & order) | Excel Worksheet Functions | |||
Is there an formula to reverse the order of a number sequence? | Excel Discussion (Misc queries) | |||
Including control toolbox objects in tab order | Excel Programming |