Click here to Skip to main content
15,911,035 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: VBS for next loop Pin
Wombaticus19-Feb-16 0:26
Wombaticus19-Feb-16 0:26 
GeneralRe: VBS for next loop Pin
Member 1191673519-Feb-16 0:36
Member 1191673519-Feb-16 0:36 
GeneralRe: VBS for next loop Pin
Wombaticus19-Feb-16 0:51
Wombaticus19-Feb-16 0:51 
GeneralRe: VBS for next loop Pin
Member 1191673519-Feb-16 0:53
Member 1191673519-Feb-16 0:53 
GeneralRe: VBS for next loop Pin
Wombaticus19-Feb-16 0:55
Wombaticus19-Feb-16 0:55 
GeneralRe: VBS for next loop Pin
Member 1191673519-Feb-16 1:01
Member 1191673519-Feb-16 1:01 
GeneralRe: VBS for next loop Pin
Wombaticus19-Feb-16 1:24
Wombaticus19-Feb-16 1:24 
GeneralRe: VBS for next loop Pin
CHill6019-Feb-16 2:14
mveCHill6019-Feb-16 2:14 
The key point you are missing here is that it is not actually the same error!

If I paste your original code into t1.vbs I get the following error
C:\Temp\t1.vbs(3, 6) Microsoft VBScript compilation error: Expected end of statement
Removing the i after the Next fixes that problem (as suggested by @Wombaticus)

If I do the same thing with your first block of code above I get
C:\Temp\t1.vbs(1, 7) Microsoft VBScript compilation error: Expected end of statement
...getting rid of the as Integer fixes that one (as suggested by @Wombaticus)

Your second block of code above does not produce anything - neither error nor output. If you were getting an error there are you sure you remembered to save the changes in your editor before attempting to run the script file? We've all done that a few times Laugh | :laugh:

However, to get to the point ... See those numbers in brackets in my error messages above that are in bold? They indicate the ROW and COLUMN that the error occurs in - so the error moved from line 3 in the first example to line 1 in the second. Much easier to find the problem when you know that little bit of extra infomation
GeneralRe: VBS for next loop Pin
Member 1191673523-Feb-16 22:26
Member 1191673523-Feb-16 22:26 
AnswerRe: VBS for next loop Pin
Richard MacCutchan19-Feb-16 0:45
mveRichard MacCutchan19-Feb-16 0:45 
GeneralRe: VBS for next loop Pin
Member 1191673519-Feb-16 0:51
Member 1191673519-Feb-16 0:51 
GeneralRe: VBS for next loop Pin
Richard MacCutchan19-Feb-16 0:56
mveRichard MacCutchan19-Feb-16 0:56 
GeneralRe: VBS for next loop Pin
Member 1191673519-Feb-16 1:02
Member 1191673519-Feb-16 1:02 
GeneralRe: VBS for next loop Pin
Richard MacCutchan19-Feb-16 2:25
mveRichard MacCutchan19-Feb-16 2:25 
AnswerRe: VBS for next loop Pin
Eddy Vluggen19-Feb-16 1:55
professionalEddy Vluggen19-Feb-16 1:55 
GeneralRe: VBS for next loop Pin
CHill6019-Feb-16 2:06
mveCHill6019-Feb-16 2:06 
QuestionSQL Server Connection error not caught by error handling. Pin
Christopher Kettlewell18-Feb-16 11:19
Christopher Kettlewell18-Feb-16 11:19 
AnswerRe: SQL Server Connection error not caught by error handling. Pin
Richard Deeming19-Feb-16 1:22
mveRichard Deeming19-Feb-16 1:22 
GeneralRe: SQL Server Connection error not caught by error handling. Pin
Christopher Kettlewell21-Feb-16 12:19
Christopher Kettlewell21-Feb-16 12:19 
GeneralRe: SQL Server Connection error not caught by error handling. Pin
Richard Andrew x6421-Feb-16 12:53
professionalRichard Andrew x6421-Feb-16 12:53 
GeneralRe: SQL Server Connection error not caught by error handling. Pin
Christopher Kettlewell10-Mar-16 10:18
Christopher Kettlewell10-Mar-16 10:18 
QuestionExecute SQL Script using Batch Pin
DotNetNarayanan17-Feb-16 20:33
DotNetNarayanan17-Feb-16 20:33 
AnswerRe: Execute SQL Script using Batch Pin
Chris Quinn17-Feb-16 21:35
Chris Quinn17-Feb-16 21:35 
QuestionREG: COM Component in VB.Net Pin
manowj17-Feb-16 3:54
manowj17-Feb-16 3:54 
QuestionVBs How can I Show a InputBox on a Client Computer? Pin
Member 1191673517-Feb-16 1:23
Member 1191673517-Feb-16 1:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.