I have 1 module with (before I get through) many subs. The text file (I use ultra edit, not notepad) tells me the end of generated code and when the module...
I have a menu item with several selections. Whenever I try to code on the selections, it throws a syntax error at the 'Sub' line. For example, a selection...
I've coded some SUBs and forgot to DIM the variables... and the SUBs worked fine. Therefore the questions: Why DIM the variables? What does it accomplish? What...
George In a similar fashion, I would like to see the source for modules handled differently. Currently, in V3, a run time error just give the line number. If...
... Several reasons. 1) NSBasic Desktop uses VBScript as the 'engine'. All VBScript variables are treated as variants and as such, require the maximum allowed...
If you add OPTION EXPLICIT as the first line of your program, the compiler will check to make sure all variables are declared when the program starts running....
It's a good idea, but unfortunately not possible. The error messages are created by the VBScript runtime engine, not our code. Before we pass your program to...
Hi, I thought it a good idea too. The error dialog box includes NSBasic in the title, so I assume that the dialog is generated in the IDE software. Therefore,...
Hi, Oh well, that's my useful suggestion for the day out of the window ;-) However, can I add one more suggestion that could work in a similar way? Perhaps a...
When I run the code below, I get an error saying that x (in line 7) is undefined. How do I make the value of x available to Subs when the 'system' (in this...
What is the difference between CALL SUB One A, B ... ... SUB One (x, y) whatever... and CALL SUB One A, B ... ... SUB One (BYVAL x, BYVAL y) whatever... If I...
Here's an article on this topic from one of the authors of VBScript: <http://blogs.msdn.com/ericlippert/archive/2003/09/15/53005.aspx> George Henne NS BASIC...
In terms of NSBasic Desktop, does this mean: If I use ByRef, the address of the variable is passed AND I can change the variable... If I use ByVal, the address...
So a DIM 'outside' of a SUB (i.e., after the option explicit but before the first load form) makes the variable a 'global' variable, available to all SUBs, ...
Hello, the 3rd statement should work, if the file "sample.txt" really exists in C:\simpletext and if there's an application associated with the ending ".TXT"....
Hello, somewhat late, but perhaps still useful despite the other useful comments about DIM statements: "Option Explicit" at the beginning of your program, and...
Remove the "(11)" from your dim statement (it should read "Dim aHour"). The subsequent array statement takes care of establishing the number of array elements...
Thank you Thomas. The problem must have been that I had 'ultraedit' a text editor I have used for years associated with 'txt' files. Although that should not...
I prefer not to have a comma after thousands, etc. in the output of numbers. e.g. 12345 vs 12,345. In order to get decimals right, I use the formatnumber...
Jim: The parensfornegative parameter is apparently "twitchy"...must be a "feature". It doesn't like a boolean true (1) value, though on my machine, using -1...
Yes, Mark, that works. I also googled vbscipt for "formatnumber" and found essentially what you already knew. My 'split' function was really choking when I...