I am having some trouble with opening and save my form. I am able to save it but then when I go to open it the information that was saved is not in the form. Here's my code for opening and saving.
Private Sub mnuSave_Click(Index As Integer)
On Error GoTo ErrHandler
Dim IFile As Long
CommonDialog1.Filter = "Cost of Production (*.cpd)|*.cpd"
CommonDialog1.FilterIndex = 2
CommonDialog1.ShowSave
IFile = FreeFile
Open CommonDialog1.FileName For Output As IFile
tagExit:
Exit Sub
ErrHandler:
Resume tagExit
End Sub
Private Sub mnuOpen_Click()
Dim IFile As Long
On Error GoTo ErrHandler
CommonDialog1.Filter = "Cost of Production (*.cpd)|*.cpd"
CommonDialog1.FilterIndex = 2
CommonDialog1.ShowOpen
Open CommonDialog1.FileName For Random As IFile
Exit Sub
ErrHandler:
Exit Sub
End Sub
Private Sub mnuSave_Click(Index As Integer)
On Error GoTo ErrHandler
Dim IFile As Long
CommonDialog1.Filter = "Cost of Production (*.cpd)|*.cpd"
CommonDialog1.FilterIndex = 2
CommonDialog1.ShowSave
IFile = FreeFile
Open CommonDialog1.FileName For Output As IFile
tagExit:
Exit Sub
ErrHandler:
Resume tagExit
End Sub
Private Sub mnuOpen_Click()
Dim IFile As Long
On Error GoTo ErrHandler
CommonDialog1.Filter = "Cost of Production (*.cpd)|*.cpd"
CommonDialog1.FilterIndex = 2
CommonDialog1.ShowOpen
Open CommonDialog1.FileName For Random As IFile
Exit Sub
ErrHandler:
Exit Sub
End Sub