Solved

Excel 2003 VBscript Picky To Run

Posted on 2011-02-10
4
335 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
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 …
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

710 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