View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Text Box not showing inputted value

Huh? Ryan, are you on the correct thread?

"ryguy7272" wrote:

Try this:
Private Sub cmdNewPT_Click() 'my CommandButton is named 'cmdNewPT'...change
this to match the name of your button!!
Dim C As MSForms.Control
For Each C In Me.Controls
If TypeOf C Is MSForms.TextBox Then
C.Text = ""
End If
Next C
End Sub

Regards,
Ryan---
--
RyGuy


"JLGWhiz" wrote:

Change this:

Private Sub EnterNewConsult_Initialize()

To this:

Private Sub UserForm_Initialize()

It does not recognize the UserForm name for the Initialize event, It has to
be the constant provided by microsoft.

"Jacy Erdelt" wrote:

I am trying to initialise a form. I would like it clear all the text boxes,
except the last one should be popluated with "Yes" (but the user can enter
whatever info is appropriate is "yes" is not). The set.focus command works,
but the last box is still empty. What am I doing wrong?

Private Sub EnterNewConsult_Initialize()

txtStore.Value = ""

txtCustomerName.Value = ""

txtClosed.Value = "yes"

txtStore.SetFocus

End Sub