L limint Jun 1, 2004 #2 ken said: hi All. What does this command dot? Option Explicit Click to expand... When you specify Option Explicit on, you are obliged to declare all your variables before using them.
ken said: hi All. What does this command dot? Option Explicit Click to expand... When you specify Option Explicit on, you are obliged to declare all your variables before using them.
B BluDog Jun 1, 2004 #3 Option Explicit It ensures all variables are declared before you can use them. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vastmOptionExplicit.asp Cheers Blu
Option Explicit It ensures all variables are declared before you can use them. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vastmOptionExplicit.asp Cheers Blu
A Arne Janning Jun 1, 2004 #4 ken said: What does this command dot? Option Explicit Click to expand... Hi ken, Option Explicit means that you have to declare your variables before you can use them. Option Explicit On Private Sub Button1_Click(...) Handles Button1.Click i = 1 End Sub --> Compiler Error. You have to declare i first: Dim i as Integer Option Explicit Off Private Sub Button1_Click(...) Handles Button1.Click i = 1 End Sub --> no compiler error. There is only one thing to say about Option Explicit Off: do not use it. It makes your code less safe and errors will be hard to detect. Cheers Arne Janning
ken said: What does this command dot? Option Explicit Click to expand... Hi ken, Option Explicit means that you have to declare your variables before you can use them. Option Explicit On Private Sub Button1_Click(...) Handles Button1.Click i = 1 End Sub --> Compiler Error. You have to declare i first: Dim i as Integer Option Explicit Off Private Sub Button1_Click(...) Handles Button1.Click i = 1 End Sub --> no compiler error. There is only one thing to say about Option Explicit Off: do not use it. It makes your code less safe and errors will be hard to detect. Cheers Arne Janning
A Armin Zingler Jun 1, 2004 #5 ken said: hi All. What does this command dot? Option Explicit Click to expand... http://msdn.microsoft.com/library/en-us/vblr7/html/vastmOptionExplicit.asp -- Armin How to quote and why: http://www.plig.net/nnq/nquote.html http://www.netmeister.org/news/learn2quote.html
ken said: hi All. What does this command dot? Option Explicit Click to expand... http://msdn.microsoft.com/library/en-us/vblr7/html/vastmOptionExplicit.asp -- Armin How to quote and why: http://www.plig.net/nnq/nquote.html http://www.netmeister.org/news/learn2quote.html
H Herfried K. Wagner [MVP] Jun 1, 2004 #6 * =?Utf-8?B?a2Vu?= said: What does this command dot? Option Explicit Click to expand... Place the caret on 'Option Explicit' and press the F1 key.
* =?Utf-8?B?a2Vu?= said: What does this command dot? Option Explicit Click to expand... Place the caret on 'Option Explicit' and press the F1 key.