PDA

View Full Version : How to find an error in my VBA !!



vodkasoda
03-09-2009, 06:43 AM
If I try to Save my VBA code or Spreadsheet I get a pop-up error message saying "Document not saved" ... so helpful !!!

I am assuming this is because if I click Debug & choose "Compile VBAProject" I get a pop-up message saying "Invalid procedure call or argument" ...

But, if I actually run the program, every part I try seems to work fine ... how do I find where this error is ?!?

Thanks in advance ...

Bob Phillips
03-09-2009, 06:58 AM
Post the code, we are guessing otherwise.

Cosmo
03-09-2009, 07:13 AM
Are you using 'Option Explicit' in all of your code modules?

vodkasoda
03-09-2009, 07:28 AM
Are you using 'Option Explicit' in all of your code modules?

Yes I am ...

vodkasoda
03-09-2009, 07:31 AM
Post the code, we are guessing otherwise.

How ? I can't save it to attach it & I don't particularly want to cut & paste every module & the code behind every UserForm ...

vodkasoda
03-09-2009, 08:09 AM
After searching the Internet, I noticed that some people got similar problems to this because their data was corrupt.

I Exported all of my Modules & UserForms, created a new Spreadsheet & Imported all of my Modules & UserForms into the new sheet ... it now looks to be OK :hairpull: !!!

mdmackillop
03-09-2009, 10:41 AM
FYI you can post a workbook using Manage Attachments in the Go Advanced reply section.