Pablo,
If the code is in the UserForm module (and obviously it is or it wouldn't
work otherwise) then you can safely omit the "Me" as the context is assumed
to be the UserForm. The only time I ever use "Me" is when I'm checking to see
if the UserForm is visible before executing some code - usually validation
and formatting code in the Exit event of the control; e.g.:
Private sub txtDate_Exit(ByVal Cancel as MSForms.ReturnBoolean)
If Me.Visible = True Then
If IsDate(txtDate.Value) = False Then
MsgBox "Please enter a valid date.", vbCritical, "Date Error"
Cancel = True
End If
End If
End Sub
In this case a specific context for the Visible property is required -
although thinking about it now, since I instantiate an instance of the
UserForm object, if I declared it as Public, I could probably refer to it
specifically (e.g. If MyForm.Visible = True). Might have to check that out...
--
Cheers!
Gordon Bentley-Mix
Word MVP
Uninvited email contact will be marked as SPAM and ignored. Please post all
follow-ups to the newsgroup.