Click here to Skip to main content
16,005,826 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How to change return value ? Pin
Christian Graus6-Nov-09 11:54
protectorChristian Graus6-Nov-09 11:54 
QuestionLarge size of Excel files Pin
Saurabh_Damle6-Nov-09 1:59
Saurabh_Damle6-Nov-09 1:59 
AnswerRe: Large size of Excel files Pin
DaveAuld6-Nov-09 10:16
professionalDaveAuld6-Nov-09 10:16 
GeneralRe: Large size of Excel files Pin
Saurabh_Damle6-Nov-09 20:42
Saurabh_Damle6-Nov-09 20:42 
GeneralRe: Large size of Excel files Pin
DaveAuld6-Nov-09 21:17
professionalDaveAuld6-Nov-09 21:17 
QuestionUpdate entries in Database Column. Pin
jeshra2796-Nov-09 0:50
jeshra2796-Nov-09 0:50 
QuestionPublish application in start-->program list Pin
vijay24826-Nov-09 0:08
vijay24826-Nov-09 0:08 
QuestionLabel Array HELP Pin
PAguilar095-Nov-09 18:20
PAguilar095-Nov-09 18:20 
Okay guys so I am allowing a user to enter in values into a text box and then click a button to have them display
in a listbox. My array for saving the input from the textbox into the list box is working perfectly.
But the problem I am having is that I know my code for displaying the array's indexices(elements) is not correct at all
I know there has to be a smarter way of doing this but I am lost, PLEASE HELP!!!!!! I COMMENT THE PART I NEED HELP WITH

Private Sub btnCal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCal.Click

'Variables
Dim StrArr() As String
Dim Str As String
Dim count As Integer
Dim lblStack() As Label
Dim i As Integer


    Str = txtInput.Text 'store string into variable
    StrArr = Str.Split(" ") 'use split to seperate words by space

    For count = 0 To StrArr.Length - 1
        'add user entered values to list box
        lstDisplay.Items.Add(StrArr(count))

    Next    'end for

    count = 0   'set counter back to 0

    For i = 0 To StrArr.Length - 1
        lblDis1.Text = StrArr(0) 'gets the first value from the array
        lblDis2.Text = StrArr(1) 'gets the second value from the array
        lblDis3.Text = StrArr(2) ' and so on and so on...........
        lblDis4.Text = StrArr(3)
        lblDis5.Text = StrArr(4)

    Next 'OKAY THIS IS WHERE I KNOW IF THE USER ENTER ONLY 3 VALUES IN THE TEXT BOX MY PROGRAM WOULD CRASH
         'BECAUSE THE ARRAY ONLY HAS 3 ITEMS BEING STORED IN (0)(1)AND (2) SO WHAT IS A BETTER WAY OF
         'DOING THIS LOOP AND SENDING OUT EACH ELEMENT TO THE LABELS.
End Sub

AnswerRe: Label Array HELP Pin
Christian Graus5-Nov-09 18:57
protectorChristian Graus5-Nov-09 18:57 
AnswerRe: Label Array HELP Pin
dan!sh 5-Nov-09 21:35
professional dan!sh 5-Nov-09 21:35 
GeneralRe: Label Array HELP Pin
PAguilar095-Nov-09 22:42
PAguilar095-Nov-09 22:42 
GeneralRe: Label Array HELP Pin
The Man from U.N.C.L.E.5-Nov-09 22:51
The Man from U.N.C.L.E.5-Nov-09 22:51 
GeneralRe: Label Array HELP Pin
PAguilar095-Nov-09 23:03
PAguilar095-Nov-09 23:03 
GeneralRe: Label Array HELP Pin
Sigurd Johansen6-Nov-09 10:18
Sigurd Johansen6-Nov-09 10:18 
GeneralRe: Label Array HELP Pin
PAguilar096-Nov-09 19:23
PAguilar096-Nov-09 19:23 
GeneralRe: Label Array HELP Pin
Sigurd Johansen7-Nov-09 7:23
Sigurd Johansen7-Nov-09 7:23 
GeneralRe: Label Array HELP Pin
PAguilar097-Nov-09 15:45
PAguilar097-Nov-09 15:45 
GeneralRe: Label Array HELP Pin
DaveAuld6-Nov-09 21:30
professionalDaveAuld6-Nov-09 21:30 
QuestionOutlook Contact Picture Path Problem Pin
dcdhingra5-Nov-09 18:15
dcdhingra5-Nov-09 18:15 
QuestionHelp with Modules-specifically subprocedures Pin
bphoopstar5-Nov-09 18:12
bphoopstar5-Nov-09 18:12 
AnswerRe: Help with Modules-specifically subprocedures Pin
Christian Graus5-Nov-09 19:00
protectorChristian Graus5-Nov-09 19:00 
Questionhow to read data from store procuder in dataset ? Pin
Pitou HORT5-Nov-09 16:41
Pitou HORT5-Nov-09 16:41 
AnswerRe: how to read data from store procuder in dataset ? Pin
Christian Graus5-Nov-09 19:01
protectorChristian Graus5-Nov-09 19:01 
GeneralRe: how to read data from store procuder in dataset ? Pin
Pitou HORT5-Nov-09 19:46
Pitou HORT5-Nov-09 19:46 
GeneralRe: how to read data from store procuder in dataset ? Pin
Christian Graus5-Nov-09 20:16
protectorChristian Graus5-Nov-09 20:16 

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.