Skip to content

FileName Property

Description

Returns or sets the path and filename of a selected file.

Property Type

Read-write property

Syntax (Visual Basic)

Public Property FileName() As String

Remarks

When you create the control at run time, the FileName property is set to a zero-length string (""), meaning no file is currently selected.

In the CommonDialog control, you can set the FileName property before opening a dialog box to set an initial filename.

Reading this property returns the currently selected filename from the list. If no file is selected, FileName returns a zero-length string.

See Also


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.