Asked By
David Aames
20 points
N/A
Posted on - 09/13/2012
Hi Experts,
While running this macro I received an error message
Microsoft Visual Basic Compile error: Sub or Function not defined.
From the help option on the error message “Help” option I understand nothing.
Is there anybody who can help me giving clear concept of this error message?
Any suggestion would be appreciated.
Thanks in advance.
Microsoft Visual Basic Compile error: Sub or Function not defined
Hello David,
You will need to set a reference in your VBA project to Excel Link in order to resolve that issue:
-
Go to the Microsoft Visual Basic development window's project browser and click on your project.
-
And then go to the "Tools" menu and then select "References"
-
After that check the "Excellink" box and then click "OK".
Regards,
Carl
Microsoft Visual Basic Compile error: Sub or Function not defined
Hi David,
You are getting the error message “Sub or Function not defined”, perhaps in some part of your code, the sub or function is not declared.
Another possible reason is due to that the name of the function is misspelled or you might have not been able to properly set up the procedure call.
To fix this error you can do the following steps here.