Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default "Tabbing" code crashing xl2002 WinXP

Howdy
Put 2 control toolbar text boxes on a worksheet named Textbox1 and
TextBox2.
Then in the code for the same sheet put this code:

Private Sub Textbox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger,
ByVal Shift As Integer)
If KeyCode = 9 Then
If Shift 0 Then
'nothing
Else
Worksheets("Sheet1").Range("A1").Activate
TextBox2.Activate
End If
End If
End Sub


When not in design mode, you click in TextBox1 and hit the 'tab' key
xl2002 on WinXP crashes for me.

Anyone know any code that will work on both 97 and 2002 for tabbing
between boxes?
Thanks
Matt

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default "Tabbing" code crashing xl2002 WinXP

I could reproduce it in Excel 2002, Win 2000

This worked: (using KeyUp)
Private Sub Textbox1_Keyup(ByVal KeyCode As MSForms.ReturnInteger, ByVal
Shift As Integer)
If KeyCode = 9 Then
If Shift 0 Then
'nothing
Else
ActiveCell.Activate
TextBox2.Activate
End If
End If
End Sub

--
Regards,
Tom Ogilvy


"Matt Jensen" wrote in message
oups.com...
Howdy
Put 2 control toolbar text boxes on a worksheet named Textbox1 and
TextBox2.
Then in the code for the same sheet put this code:

Private Sub Textbox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger,
ByVal Shift As Integer)
If KeyCode = 9 Then
If Shift 0 Then
'nothing
Else
Worksheets("Sheet1").Range("A1").Activate
TextBox2.Activate
End If
End If
End Sub


When not in design mode, you click in TextBox1 and hit the 'tab' key
xl2002 on WinXP crashes for me.

Anyone know any code that will work on both 97 and 2002 for tabbing
between boxes?
Thanks
Matt



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default "Tabbing" code crashing xl2002 WinXP

Once again, great thanks Tom
Matt

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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
"countifs" convert to formula in XL2002 Alan Excel Worksheet Functions 2 February 11th 08 10:01 AM
XL2002 / XP : Crashing problem mike_tyrer[_4_] Excel Programming 2 September 28th 04 11:44 PM
Can you "duplicate" "copy" listboxes and code to multiple cells? HotRod Excel Programming 1 September 1st 04 05:03 PM
Looking for VB code to test for "RING" , "BUSY" disconnects or other signals BruceJ[_2_] Excel Programming 3 November 20th 03 01:55 AM


All times are GMT +1. The time now is 09:49 PM.

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"