See if this is helpful to you. if you just want to clear textboxes.
2 ways.
Ist Method.
-----------
private sub Refresh_Click()
Set gForm = me
ClearControls
end Sub
any module....
----------------------------------------
Option Explicit
Public gForm as Form
Public Sub ClearControls()
Dim Ctrl As Control
For Each Ctrl In gForm.Controls
If TypeOf Ctrl Is TextBox Then
Ctrl.Text = ""
End If
Next
End Sub
+++++++++++++++++++++++++++++++++++++++++++++++++++
2nd MEthod
-----------
Private Declare Function EbExecuteLine Lib "vba6.dll" (ByVal pStringToExec As Long, ByVal Unknownn1 As Long, ByVal Unknownn2 As Long, ByVal fCheckOnly As Long) As Long
Public Function ExecuteLine(sCode As String, Optional fCheckOnly As Boolean) As Boolean
ExecuteLine = EbExecuteLine(StrPtr(sCode), 0&, 0&, Abs(fCheckOnly)) = 0
End Function
Shakeel
SyedShakeel@hotmail.com