473,386 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

When do I have do define variables with "DIM" ?

Occasionally I saw VBS script where local variables were declared on top
with a statement like

DIM myvar

However most of my own vbs script run without such declaration.
When do I need them and when not?

Tony

Jun 27 '08 #1
3 1011
Tony, VB.NET and VBS are two completely different animals.

Please do NOT post, (or crosspost), matters relating to VBS to
microsoft.public.dotnet.languages.vb.
"Tony Bansten" <to******@hotmail.comwrote in message
news:48**********************@newsspool3.arcor-online.net...
Occasionally I saw VBS script where local variables were declared on top
with a statement like

DIM myvar

However most of my own vbs script run without such declaration.
When do I need them and when not?

Tony
Jun 27 '08 #2
I have answered this one yesterday in "microsoft.public.scripting.vbscript"
although the question and answer could have been the same for VBA, VB6 ,
VB.Net ( explicit VS implicit declaration )

See every VB like language as a human from a different family maybe one
language is less evolved but they are sure not another species
regards

Michel Posseth

"Stephany Young" <noone@localhostschreef in bericht
news:Og****************@TK2MSFTNGP02.phx.gbl...
Tony, VB.NET and VBS are two completely different animals.

Please do NOT post, (or crosspost), matters relating to VBS to
microsoft.public.dotnet.languages.vb.
"Tony Bansten" <to******@hotmail.comwrote in message
news:48**********************@newsspool3.arcor-online.net...
>Occasionally I saw VBS script where local variables were declared on top
with a statement like

DIM myvar

However most of my own vbs script run without such declaration.
When do I need them and when not?

Tony

Jun 28 '08 #3
Michel,

I don't like this guy, it is not a Comunity person, he only wants to consume
answers, drops in all kind of newsgroups post and set his follow up to one
newsgroup, so we cannot see what the other answers were. Because this is as
well used by somebody using a woman name, and it started at the same time, I
think that it is the same poster.

I have tried this a while with the name Corrina, but that was not serious
(Herfried knows this)

But it seems that Stephany likes this kind of behaviour.

:-)

Cor

"Michel Posseth [MCP]" <MS**@posseth.comschreef in bericht
news:%2****************@TK2MSFTNGP04.phx.gbl...
>I have answered this one yesterday in "microsoft.public.scripting.vbscript"
although the question and answer could have been the same for VBA, VB6 ,
VB.Net ( explicit VS implicit declaration )

See every VB like language as a human from a different family maybe one
language is less evolved but they are sure not another species
regards

Michel Posseth

"Stephany Young" <noone@localhostschreef in bericht
news:Og****************@TK2MSFTNGP02.phx.gbl...
>Tony, VB.NET and VBS are two completely different animals.

Please do NOT post, (or crosspost), matters relating to VBS to
microsoft.public.dotnet.languages.vb.
"Tony Bansten" <to******@hotmail.comwrote in message
news:48**********************@newsspool3.arcor-online.net...
>>Occasionally I saw VBS script where local variables were declared on top
with a statement like

DIM myvar

However most of my own vbs script run without such declaration.
When do I need them and when not?

Tony

Jun 28 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Monte | last post by:
It compiles fine in one of my ms2002 databases, but on another db (I inherited from somebody else), I get this compile error: "User-defined type not defined" Is something turned off in this...
3
by: Johnny M | last post by:
using Access 2003 Pardon the subject line, but I don't have a better word for this strange behavior (or behavior I don't understand!!!) I have a class module named DepreciationFactor. One of...
3
by: Bart Lateur | last post by:
For some reason, "Database" isn't recognised by Access as a built-in/predefined type, in Access' own VBA. Whenever I try to compile a line like Dim db as Database I get the complaint that...
1
by: iam247 | last post by:
Hi I have a web page which receives information from a form (using request.form) and also attempts to look at an Access query to read in recoeds to a variable named rsGroup. When I have the...
0
by: Rob Meade | last post by:
Hi all, I've written a small app which firstly reads in from an xml config file to set some start parameters. once this is done, it takes the supplied path from the config file, iterates...
6
by: Rob Meade | last post by:
Hi all, Ok - I've used the word gramatically - which I'm sure is incorect, however I mean when VS2005 lists "warnings" like this one: Warning 1 Variable 'Command' is used before it has been...
4
by: Vincent Finn | last post by:
Hi, in some code I have there is a variable declared as Dim as String what is the for in this case? I thought it was an array at first but as far as I can tell the variable is just a...
17
by: Tim Baur | last post by:
Hi All, I'm a VB6er who's recently started using VB2005; I have a general question about variable declaration. In VB, I've always tried to avoid using the "As New" construct when declaring a...
5
by: Matt | last post by:
Ok so I'm trying to run a simple dos command shell through a VB.NET 2005 program. The oddest thing is happening given the following piece of code: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.