Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to set the key to tab spaces in a text box???

Status
Not open for further replies.

bigvinny

Programmer
Jul 17, 2001
2
US
Hi,

I created a form that that has a text box and i need to be able to tab(create spaces) inside the text box?

Ive statred by useing the properties of the box and started to create a macro for: On key Press - [Event Procedure]

which bring up a start:

Private Sub Text0_KeyPress(KeyAscii As Integer)


End Sub

I have not been able to find the ascii code for the TAB key??

any ideas or examples would be helpful thanks

HELP........
 
Thanks but i read a book and worked it out here is the code:

Private Sub Text0_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyTab Then
SendKeys " "
KeyCode = vbEmpty
End If

End Sub

thanks .....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top