Forum Discussion
strugglingChemE
Jun 24, 2022Copper Contributor
Sub or Function not defined Excel VBA (w/ Command Button)
Hello! I am working on coding a macro that transfers three columns of data from one workbook to another. When setting up and running the program, I keep getting a Compile Error: Sub or Function not defined. I have referencing turned on and have tried multiple methods of troubleshooting. Any help with fixing this problem would be greatly appreciated. Thanks in advance!
It will highlight the top line and usually the word 'Worksheets' as well.
*If I need to provide any additional information please let me know!
2 Replies
- OliverScheurichGold Contributor
You can try 'Worksheets' instead of 'Workseets'.
- strugglingChemECopper ContributorGreat point thank you! I am still receiving an error from the first part of the code.