Thread: Reset userform
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Reset userform

Curt,
If you are only hiding the userform, then all its properties remain
unchanged. But adapting Chip's code slightly for the Option button, to set
them all to False:

Dim C As MSForms.Control

For Each C In Me.Controls
If TypeOf C Is MSForms.OptionButton Then
C.Value = False
End If
Next C

NickHK

"Curt" wrote in message
...
useing option button in userform. Userform goes to sheet and hides. Upon
recall there is a dot in front round window of last action. When this is

in
window it disables use of option button. Seems that the userform remembers
last action. Can this last action be disabled thru properties? Or does it
need to be done with code. If code how.
Thanks You

"Chip Pearson" wrote:

If you are talking about clearing text boxes, use code like the
following:

Dim C As MSForms.Control
For Each C In Me.Controls
If TypeOf C Is MSForms.TextBox Then
C.Text = ""
End If
Next C


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Newbie" wrote in message
...
Is there some simple short code to clear all entries from a

userform?