Jump to content
Software FX Community

For..Next loop using Step


User (Legacy)

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...