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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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 | |
|
|