Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub mnuFileOpen_Click ()
' CancelError is True.
On Error GoTo ErrHandler
' Set filters.
CommonDialog1.Filter = "All Files (*.*)|*.*|Text _
Files (*.txt)|*.txt|Batch Files (*.bat)|*.bat"
' Specify default filter.
CommonDialog1.FilterIndex = 2
' Display the Open dialog box.
CommonDialog1.ShowOpen
' Call the open file procedure.
OpenFile (CommonDialog1.FileName)
Exit Sub
ErrHandler:
' User pressed Cancel button.
Exit Sub
End Sub
Public Function f_GetLogFolder() As String
On Error GoTo ErrorHandler
With CommonDialog1
.Filter = "log file (Log.csv)|Log.csv"
.FilterIndex = 1
.DefaultExt = ""
.DialogTitle = "Get log file"
.Flags = cdlOFNHideReadOnly _
Or cdlOFNPathMustExist _
Or cdlOFNExtensionDifferent
.CancelError = True
.FileName = "Log.csv"
.InitDir = "c:\temp"
On Error GoTo CancelHandler 'cancel sets error
.ShowSave
On Error GoTo ErrorHandler
f_GetLogFolder = .FileName
End With
Exit Function
CancelHandler:
f_GetLogFolder = ""
Exit Function
ErrorHandler:
MsgBox "Error " & Err.Number & Err.Description
Resume
Private Sub mnuItemSave_Click()
With CommonDialog1
.Filter = "Text files (*.TXT)|*.TXT"
.CancelError = True
On Error GoTo CancelHandler
.ShowSave
Open .filename For Output As #1
Print #1, txtNote.Text
Close #1
End With
Exit Sub
CancelHandler:
Exit Sub
End Sub