Consulting

Results 1 to 2 of 2

Thread: # in VB

  1. #1

    # in VB

    I thought that # meant double, but in this instance, it doesn't make sense:

    Also, why is it used to open it and to write to it but NOT to close it!?

    Thank you so much
    RoyalKing

    Open strName For Input As #intUnit

    'Read Each Line in
    Do While Not EOF(intUnit)

    Line Input #intUnit, strBuffer
    vntBuf = Split(strBuffer, " ")

    'Go through each word in that Line
    For intWord = 0 To UBound(vntBuf)

    If (StrComp(vntBuf(intWord), "Date:", vbTextCompare) = 0) Then
    MsgBox ("Found it! " & intLine + 1 & "," & intWord + 1)


    Exit Sub
    Else
    End If
    Next intWord

    intLine = intLine + 1
    Loop
    Close intUnit

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    It's a compiler directive, and it is used to close it.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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