Input Function [VBA]

Returns the open stream of an Input or Binary file (String).

Warning Icon

This function or constant is enabled with the statement Option VBASupport 1 placed before the executable program code in a module.


தொடரமைப்பு:

Input( Number as Integer, [# ] FileNumber as Integer)

திரும்பும் மதிப்பு:

String

அளவுருக்கள்:

Number: Required. Numeric expression specifying the number of characters to return.

#: Optional.

FileNumber: Required. Any valid file number.

பிழையான குறியீடுகள்:

6 நிரம்பிவழிதல்

52 செல்லாத கோப்பு பெயர் அல்லது கோப்பு எண்

62 வாசித்தல் EOFஐ மீறியுள்ளது

எடுத்துக்காட்டு:

REM ***** BASIC *****

Option VBASupport 1

Sub Example_Input

 Dim MyData

 Open "MyDataFile.txt" For Input As #1

 Do While Not EOF(1)

  MyData = Input(1, #1)

  Print MyData

 Loop

 Close #1

End Sub