View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Charles Charles is offline
external usenet poster
 
Posts: 1
Default text box percent field

Spencer,

You could try this.

Private Sub textbox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger
ByVal Shift As Integer) 'tab key
Application.ScreenUpdating = False
If KeyCode = "9" Or KeyCode = "13" Then
With UserForm1
.TextBox1.Text = .TextBox1.Text & " " & "%"
End With
End If
End Sub

When the user tabs off or press the enter key the % will be placed i
the textbox.

Charle

--
Message posted from http://www.ExcelForum.com