mcs26
asked on
Outlook VBA Sub or Function Not Defined
Hi,
I have a public sub routine in "ThisOutlookSession" that I am trying to call from a class module I have made. But getting an error message saying sub or function is not defined. I have checked the spelling of the sub so can't see why i cannot do this.
Thanks
I have a public sub routine in "ThisOutlookSession" that I am trying to call from a class module I have made. But getting an error message saying sub or function is not defined. I have checked the spelling of the sub so can't see why i cannot do this.
Thanks
ASKER
Hi Pete,
I have check the procedure name is spelled correctly. Is this an outlook issue when having code in the "ThisOutlookSession"?
Thanks
I have check the procedure name is spelled correctly. Is this an outlook issue when having code in the "ThisOutlookSession"?
Thanks
Just to clarify, you have a sub procedure named ThisOutlookSession and it is located in the ThisOutlookSession module? I'm wondering if it is a naming confilict. Can you try renaming the sub to see if the error goes away?
OM Gang
OM Gang
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Cheers Chris, xcatly what I was looking for!
Trying to call a procedure from another project without explicitly adding a reference to that project in the References dialog box.
Specifying a procedure that is not visible to the calling procedure.
Declaring a Windows dynamic-link library (DLL) routine or Macintosh code-resource routine that is not in the specified library or code resource.
To correct this error
Find the name of the project containing the procedure you want to call in the References dialog box. If it does not appear, click the Browse button to search for it. Select the check box to the left of the project name, and then click OK.