Private Sub cmdUndo_Click() Call ClearTextboxes(Me.Name) End Sub
The code for procedure ClearTextboxes is in a module:
Public Sub ClearTextboxes(ByVal FormName As String) For Each ctl In FormName.Controls If TypeOf ctl Is TextBox Then ctl.Text = "" End If Next End Sub
When program runs, message box appears with "Compile error. Invalid qualifier" and FormName is highlighted. It means FormName is an invalid qualifier, but trying "qualifiers" other than FormName gives same result. What is wrong? Thanks.
This post has been edited by AN1554: 13 November 2011 - 08:42 AM