Results 1 to 5 of 5

Thread: Using Arrays [resolved]

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2005
    Posts
    384

    Resolved Using Arrays [resolved]

    Hello Everyone!
    In a Module I've declared an array ands a counter variable like so:
    VB Code:
    1. Public LPProgLoc(9) As String
    2.     Public IndLP As Integer

    The purpose of this array is to store 10 program locations on the pc. The catch is that I used 2 seperate forms. One to start the programs, and one to browse for the programs.
    On my first form I'm trying to use the counter variable like:
    VB Code:
    1. Dim LPEditProp As New frmLPEditProp
    2.  
    3.         If RadioButton1.Checked  = True Then
    4.             IndLP = 0
    5.         ElseIf RadioButton2.Checked = True Then
    6.             IndLP = 1
    7.         End If
    8.  
    9.         If (LPEditProp.ShowDialog() = DialogResult.OK) Then
    10.                LPProgLoc(IndLP) = LPEditProp.ofdLPBrowse.FileName
    11.         End If
    12.     End Sub
    But the problem is that it doesn't store all the programs in the array - it just loads the last inserted item.
    I want to have 2 different radiobuttons load 2 different programs, instead of 2 different radio buttons loading the same program.
    How can I achieve that?
    Last edited by GrimmReaper; Jan 24th, 2006 at 06:13 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width