Jump to content
Software FX Community

For..Next loop using Step


User (Legacy)
 Share

Recommended Posts

I am trying to use a For..Next loop with a Step  but it is giving me an

Overflow error because Step is an enum in CfxGallery. Has anybody else

experienced this? Is there something else that I need to do? Here is my

code:

For i = lvSlice.ListItems.Count - 1 To 0 Step -1 'Fails here

lblGroup(i).Visible = True

lblGroup(i).Caption = lvSlice.ListItems.Item(i + 1).Text

txtGreen.Item(i).Visible = True

txtRed.Item(i).Visible = True

txtYellow.Item(i).Visible = True

Next

Daniel Reber

Datamasters, Inc

Link to comment
Share on other sites

Never mind. I declared 'i' as byte.  VB did not like it for some reason.  I

worked when I changed it to integer.

"Daniel Reber" <dreber@nospam.dminconline.com> wrote in message

news:aREYOG8nCHA.3152@webserver1.softwarefx.com...

> I am trying to use a For..Next loop with a Step but it is giving me an

> Overflow error because Step is an enum in CfxGallery. Has anybody else

> experienced this? Is there something else that I need to do? Here is my

> code:

>

> For i = lvSlice.ListItems.Count - 1 To 0 Step -1 'Fails here

> lblGroup(i).Visible = True

> lblGroup(i).Caption = lvSlice.ListItems.Item(i + 1).Text

> txtGreen.Item(i).Visible = True

> txtRed.Item(i).Visible = True

> txtYellow.Item(i).Visible = True

> Next

>

> Daniel Reber

> Datamasters, Inc

>

>

>

>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...