What does this mean, I see it at the top of code windows and I just woundered what it is there for. Every one probably knows this but I don't cause it isn't mentioned I any books on VB.
Code:Option Explicit
Printable View
What does this mean, I see it at the top of code windows and I just woundered what it is there for. Every one probably knows this but I don't cause it isn't mentioned I any books on VB.
Code:Option Explicit
It means that using an undeclared variable will result in an error. Try this code:
A is not declared, so if you add option explicit it will not run.Code:For a = 1 To 100
Next
if you do not use Option Explicit the following will be two different variables.
[CODE]
Private Sub Command1_Click()
For abc = 1 To 100
Next abc
Text1.Text = acb
End Sub
So if you spell something wrong, VB will make it a new variable.
I get it now, its about the same as what I thought. Thanx