I'm stumped! Anyone ever had to deal with this?
Thanks!
Todd
>.
>
I appreciate the thought, though!
Any other ideas?
Todd
>.
>
Todd
>.
>
You can, however, replace them with "Text Boxes" from the "Control
Toolbox's" toolbar, which are tabbing enabled, I believe. Try a test run
on a "New" worksheet before committing.
Trent
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
The TabOrder property is an inherited property. That means it comes from
the container that a control is situated in. A UserForm supplies this
property, a worksheet doesn't. You can still tab amongst controls on a
worksheet, you just have to code it yourself using each control's KeyDown
event procedure.
In the sample event procedure below I'll assume a hypothetical situation
where we have three textboxes: TextBoxPrevious, TextBoxCurrent, and
TextBoxNext. This event procedure shows you how to use VBA to emulate
tabbing behavior. Pressing Tab moves from TextBoxCurrent to TextBoxNext and
pressing Shift+Tab moves from TextBoxCurrent to TextBoxPrevious. The Up and
Down arrow keys and the Enter key are given similar behavior.
Private Sub TextBoxCurrent_KeyDown(ByVal KeyCode As MSForms.ReturnInteger,
ByVal Shift As Integer)
Dim bBackwards As Boolean
Select Case KeyCode
''' These are the only keys we care about.
Case vbKeyTab, vbKeyReturn, vbKeyDown, vbKeyUp
Application.ScreenUpdating = False
''' Determine if we need to move backwards.
bBackwards = CBool(Shift And 1) Or (KeyCode = vbKeyUp)
''' In Excel 97 we must select a cell before activating another
control.
If Application.Version < 9 Then Sheet1.Range("A1").Select
''' Activate the appropriate control based on key(s) pressed.
If bBackwards Then TextBoxPrevious.Activate Else
TextBoxNext.Activate
Application.ScreenUpdating = True
End Select
End Sub
--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/
* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *
"Todd" <ttho...@edd.ca.gov> wrote in message
news:02a801c31bd2$bd5481a0$a101...@phx.gbl...
Try unprotecting the cells you want to tab to (right
click on each cell, choose the protection tab, and click
on the lock button so there is no check in it). Then
protect the sheet. This will allow you to tab between the
unprotected cells.
>.
>
What am I doing wrong?
Thanks,
Eric
You may want to take a look at the way Harald Staff did it in this thread:
http://google.co.uk/groups?threadm=uDCxIjX3EHA.1144%40TK2MSFTNGP09.phx.gbl
(If this was a followup to something I posted, I kind of remember thinking that
you were using a UserForm--but I could be mistaken.)
--
Dave Peterson