A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Draw text Boxes and Control Box Text Boxes ???? Confused



 
 
Thread Tools Display Modes
  #1  
Old September 19th, 2003, 03:07 PM
steve
external usenet poster
 
Posts: n/a
Default Draw text Boxes and Control Box Text Boxes ???? Confused

In Excel 97 there are two types of Text Boxes those that are created by the
Draw toolbar and those that are created by the Control Box toolbar. One
seems to be a Text Box 1 and the other a TextBox1.

Can anyone give me the code to tab from the Draw Text Box to the Control
TextBox and back to the Draw Text Box. I have figured out how to go from
Control TextBox to a cell. And I have found out how to go from one Control
TextBox to another Control TextBox, but I have some Draw Text Boxes that I
want to go to and from also.

Here is the the code I have for the first 2 things I solved. They may be of
help to others or may jog your memory to help
solve my problem.

Private Sub TextBox1_KeyDown(ByVal KeyCode As _
MSForms.ReturnInteger, ByVal Shift As Integer)

If KeyCode = vbKeyTab Then
Range("A2").Activate 'from control TB to Cell
End If
End Sub

And

Private Sub TextBox1_KeyDown(ByVal _
KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = vbKeyTab Or KeyCode = vbKeyReturn Then
ActiveCell.Select
If Shift Then
TextBox4.Activate 'From Control TB to Control TB
Else
TextBox2.Activate
End If
End If
End Sub



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:44 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.