V
VB Novice Hendri
Guest
I have a Data Tabel with 50 similary named Colums, "Con1 to Con50"
Most of the time not all will be used.
I need a simple way to count the ones that has data in before creating labels in an arry.
I tryed this so far, please help.
Dim recipeSelected As String = TitleListBox.SelectedItem.ToString()
Dim result = recipesLst.Where(Function(x) x.RecipeName = recipeSelected).FirstOrDefault()
'Form1.TextBox1.Text = result.ID.ToString()
Dim ContentCountVar As Integer
Dim ActiveContent As String = "Con" & ContentCountVar.ToString
For ContentCountVar = 1 To 50
If ActiveContent = Nothing Then
MsgBox("Nothing")
Else
ContentCount = ContentCount + 1
End If
Form1.TextBox1.Text = ContentCount.ToString
Next ContentCountVar
Continue reading...
Most of the time not all will be used.
I need a simple way to count the ones that has data in before creating labels in an arry.
I tryed this so far, please help.
Dim recipeSelected As String = TitleListBox.SelectedItem.ToString()
Dim result = recipesLst.Where(Function(x) x.RecipeName = recipeSelected).FirstOrDefault()
'Form1.TextBox1.Text = result.ID.ToString()
Dim ContentCountVar As Integer
Dim ActiveContent As String = "Con" & ContentCountVar.ToString
For ContentCountVar = 1 To 50
If ActiveContent = Nothing Then
MsgBox("Nothing")
Else
ContentCount = ContentCount + 1
End If
Form1.TextBox1.Text = ContentCount.ToString
Next ContentCountVar
Continue reading...