Solved

Excel 2003 VBscript Picky To Run

Posted on 2011-02-10
4
330 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
  • 2
4 Comments
 
LVL 85

Expert Comment

by:Rory Archibald
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks Fernando.
0
 
LVL 6

Expert Comment

by:FernandoFernandes
Comment Utility
;-)
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This article will show you how to use shortcut menus in the Access run-time environment.
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now