Forum Discussion

strugglingChemE's avatar
strugglingChemE
Copper Contributor
Jun 24, 2022

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!

Resources