Solved

Excel 2003 VBscript Picky To Run

Posted on 2011-02-10
4
334 Views
Last Modified: 2012-05-11
Has anyone experienced a problem with VBScript being very picky about it's placement in this or that bas file.

I'm running into situations where I can't debug a little scriplet because Excel does not even seem to be able to identify the function name. If I move that same function into a new module, Excel mysteriously sees it and everything is beautiful again... for a while. Then I end up in the same mess all over again.

Should I chuck this thing and upgrade to Excel 2010?

Thanks.
0
Comment
Question by:gbmcneil
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 34866726
The proper location for code is no different in any version. As a basic rule, unless you are using an event routine, all code should be in a normal module, not in a worksheet module or the ThisWorkbook module.
0
 
LVL 6

Accepted Solution

by:
FernandoFernandes earned 250 total points
ID: 34866758
also, please try not to
1) make those huge gigantic modules with all your functions and subroutines only in on module.
2) make sure your modules do not have more than 1000 lines of code...
3) make sure you're able to do Debug / Compile as this checks for all the sintax, and may help finding possible errors
0
 

Author Closing Comment

by:gbmcneil
ID: 34988424
Thanks Fernando.
0
 
LVL 6

Expert Comment

by:FernandoFernandes
ID: 34988810
;-)
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question