Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2006

Tip: Looking for answers? Try searching our database.

Syntax Error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Cash - 24 Oct 2006 00:30 GMT
Hope I'm in right newsgroup, othervise sorry.

I have a problem when compiling following code. The message i get is: "NEXT
without FOR". It's on the last NEXT the compile-error appears.
Could anyone please help me and let me know how I should write the code
instead.

Thanx in advance.

For intCC2 = 1 To 10
   TAGNAMN_CC2(intCC2) = "CC2_SMS" & intCC2
   eda_err = eda_get_one_float(Node, TAGNAMN_CC2(intCC2), Field,
fValue_CC2(intCC2))

   If fValue_CC2(intCC2) = 1 And Not cycle_CC2(intCC2) Then
       cycle_CC2(intCC2) = True
       RunLog ("Customer Care 2 = CC2 " & intCC2 & " aktiv")
       List1.AddItem "Customer Care 2 = CC2 " & intCC2 & " aktiv " &
Time(Now)

           'Sänder ut larmet via SENDMAIL
           For intCC2Tel = 1 To intAntalTelCC2
               temp_CC2(intCC2) = Shell("d:\Mail\Sendmail /I /" &
TelNrCC2(intCC2Tel) & " /" & TextCC2(intCC2))
               Wait 0.6
           Next

   ElseIf fValue_CC2(intCC2) = 0 Then
       cycle_CC2(intCC2) = False
Next
Jonathan West - 24 Oct 2006 00:42 GMT
Insert "End If" in the line immediately before the last Next.

Then download Smart Indenter from http://www.bmsltd.ie/Indenter/Default.htm 
and install it, so you can get your code consistently indented to make it
easier to identify such problems in future.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

> Hope I'm in right newsgroup, othervise sorry.
>
[quoted text clipped - 27 lines]
>        cycle_CC2(intCC2) = False
> Next
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.