Previous Topic

Next Topic

InputFileSave - MaxBasic Function

InputFileSave(Prompt: String[, Title: String, InitialDirectory: String, Filter: String, DefaultExtension: String]): String

Displays a prompt in a dialog box, User must input or select a valid file name, and returns the file name as a string.

InputFileSave function syntax has these named arguments:

Parameter

Description

Prompt

Required. String expression displayed as the message in the dialog box.

Title

Optional. String expression displayed in the title bar of the dialog box. If you omit title, the application name is placed in the title bar.

Initial Directory

Optional. The initial directory the Windows file select dialog will open in, for example, "C:\Data".

Filter

Optional. The list of file filters for the Save as Type selection, separated by pipes, for example, "Text Files(*.txt)|*.txt|All Files|*.*".

Note that the first extension in the list is applied as the default extension if one is not specified.

Default Extension

Optional. If specified, then this extension gets added to the end of the file name which is returned if an extension is not specified.

See also Scripted Form InputFileSave method.

For example:

Dim x as string

x = inputfilesave("Save File","Select file","C:\Data","Excel Files|*.xlsx;*.xls;*.xlsm|All Files|*.*", ".xlsx")

print x

See Also

Input Functions

Book Contents

Book Index