Input Function [VBA]

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

चेतावनी प्रतिमा

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)

Return value:



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


 Close #1

End Sub