PDA

View Full Version : # in VB



royalking
12-06-2008, 11:33 AM
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

Bob Phillips
12-06-2008, 12:38 PM
It's a compiler directive, and it is used to close it.