This post is directed to the genius, boblarson. Of course, I would really appreciate any other help.
Hi Bob,
I am really stumped with this "Send2Excel" module, as I have checked everything numerous times to make sure the code is written and called correctly with the proper reference.
I have a main form with a subform that can be filtered by typing in a text box. Here is the code for the filtering procedure:
I put your "Send2Excel" code in a basic module and when I try calling it from the main form after I filter the subform it says - Compile error: Sub or Function not defined.
I don't understand. The code seems perfectly fine to me:
Any ideas?
I know you are a genius. Thank you tremendously.
Hi Bob,
I am really stumped with this "Send2Excel" module, as I have checked everything numerous times to make sure the code is written and called correctly with the proper reference.
I have a main form with a subform that can be filtered by typing in a text box. Here is the code for the filtering procedure:
Code:
Private Sub Form_Filter_Change()
Dim strFilter As String
Me.Refresh
strFilter = "semester like '%" & Me.Form_Filter & "%'"
Forms!Agency_University_Graduates!subgraduates.Form.Filter = strFilter
Forms!Agency_University_Graduates!subgraduates.Form.FilterOn = True
Me.Form_Filter.SelStart = Nz(Len(Me.Form_Filter), 0)
End Sub
I put your "Send2Excel" code in a basic module and when I try calling it from the main form after I filter the subform it says - Compile error: Sub or Function not defined.
I don't understand. The code seems perfectly fine to me:
Code:
Private Sub cmdExport_Click()
Call Send2Excel(Me.subgraduates.Form)
End Sub
Any ideas?
