File Putfilenumber value[ recordnumber File Getfilenumber value[ recordnumber

These functions are used for writing records to and reading records from a random-access file. Both functions need know the record number you want to access (write or read). The record_number argument is the number of the record we are interested in, and value is a record variable that is written to the file. The record_number argument is optional if you omit it, the record will be written to the current record position. After a record is written to or read from the file, the next record...

File Opennumber path mode[ access[ share[ recordLen

To use a file, you must first open it or create it, if it doesn't already exist. The FileOpen() function, which opens files, accepts a number of arguments, most of which are optional. The FileOpen() function replaces the Open statement of VB6, which is no longer supported in The argument path is the path of the file to be opened, and number is a number you assign to the file (usually through the FreeFile function). The mode argument determines the mode in which the file will be opened and can...

Format Currencyexpression[ numDigits AfterDecimal [ includeLeading Digit[ useParens ForNegative Numbers[ groupDigits

This function returns a numeric expression formatted as a currency value dollar amount using the currency symbol defined in Control Panel. All arguments are optional, except for the expression argument, which is the number to be formatted as currency. numDigitsAfterDecimal is a value indicating how many digits will appear to the right of the decimal point. The default value is 1, which indicates that the computer's regional settings must be used. includeLeadingDigit is a tristate constant that...

Print filenumber outputlist Print Linefilenumber outputlist

The Print function writes data to a sequential file. The first argument is the number of the file to be written, and the following arguments are the values, or variables, to be written to the file. The second argument is a parameter array, which means you can pass any number of values to the function Print fNum, var1, var2, some literal, 333.333 The Print function doesn't insert line breaks between successive calls. The following statements write a single line of text to the file opened as fNum...

Formatexpression[ format[ firstdayofweek[ firstweekofyear

This function returns a string containing an expression formatted according to instructions contained in a format expression. The expression variable is the number, string, or date to be converted, and format is a string that tells Visual Basic how to format the value. The string hh mm.ss, for example, displays the expression as a time string if the first argument is a date expression . The Format function is used to prepare numbers, dates, and strings for display. Atan 1 4 calculates pi with...

Dir[pathname[ attributes

The Dir function accepts two optional arguments and returns a string with the name of a file or folder that matches the specified pathname or file attribute s . If you specify the first argument, which supports wildcard characters, Dir will return the name of the file or folder that matches the specification. If no file or folder matched the specification, an empty string is returned . The second argument is a numeric value, which specifies one or more attributes, from the enumeration shown in...

VBNET Functions and Statements

This bonus reference describes the functions and statements that are supported by Visual Basic .NET, grouped by category. When you're searching for the statement to open a file, you probably want to locate all file I O commands in one place. This is exactly how this reference is organized. Moreover, by grouping all related functions and statements in one place, I can present examples that combine more than one function or statement. The majority of the functions are the same as in VB6. One...