Results 1 to 4 of 4

Thread: Is simple way of doing this?????

  1. #1
    Guest

    Post

    Hee is my code
    Code:
    Dim OpenFile As String
    
    CommonDialog1.filename = ""
    CommonDialog1.ShowOpen
    
    If Err <> 32755 Then
        
        OpenFile = CommonDialog1.filename
        Open OpenFile For Input As #1
        Input #1, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 _
                  , b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14 _
                  , c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14 _
                  , D1, D2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14 _
                  , e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14 _
                  , f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14 _
                  , g1, g2, g3, g4, g5, g6, g7, g8, g9, g10, g11, g12, g13, g14 _
                  , h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11, h12, h13, h14 _
                  , i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14 _
                  , j1, j2, j3, j4, j5, j6, j7, j8, j9, j10, j11, j12, j13, j14 _
                  , k1, k2, k3, k4, k5, k6, k7, k8, k9, k10, k11, k12, k13, k14 _
                  , L1, L2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14 _
                  , m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14 _
                  , n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12, n13, n14
        Close #1
    End If
    My Task:I have to find out (for EACH Variable) If they are a 1, 2, 3, 4 or 5. I know one way how to do it and it's pretty long. Is there a wayto simplify this?

  2. #2
    Member
    Join Date
    Feb 1999
    Location
    Lexington,kentucky,USA
    Posts
    61

    Post

    You may use the loop, to input the data,
    Idon't know if that is what you want.

    Hint:

    For i= 95 to 120
    for j=1 to 14
    ValString = ValString & Char(i)& j & ","
    next j
    next i

    '
    Valstring contains the Required input
    Input #1 Valstring


    I don't know the Exact Range for the Ascii Value. I hope you got the Idea.


    I hope this is what to you need.

  3. #3
    Guest

    Post

    Is there a way that I could find out the value of a1,a2,a3,a4 etc. all the way down
    to n14???

  4. #4
    Addicted Member
    Join Date
    Jul 1999
    Location
    Portland, OR.
    Posts
    226

    Post

    Hi.
    Yes there is. Check help file for " Character set".
    Any way:

    From a-n: char(97)-Char(110)
    From A-N: char(65)-Char(78)
    From 0-9: char(48)-Char(57)

    Lyla


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