Student1000
05-20-2010, 05:38 AM
Hi there, I want to save all the Data the user has entered before he leaves the program.
1) how can I store I store the last userform (the one that displays the results) as image in a separate folder?
2) can anyone give me a nice alternative way to exit the last userform. I'm currently using this code (in the "This Workbook" sheet):
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If (MsgBox(prompt:=" Do you really want to close?", Buttons:=vbOKCancel) = vbCancel) Then
Cancel = True
Else
Cancel = False
End If
If Cancel = False Then
Application.Quit
End If
End Sub
1) how can I store I store the last userform (the one that displays the results) as image in a separate folder?
2) can anyone give me a nice alternative way to exit the last userform. I'm currently using this code (in the "This Workbook" sheet):
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If (MsgBox(prompt:=" Do you really want to close?", Buttons:=vbOKCancel) = vbCancel) Then
Cancel = True
Else
Cancel = False
End If
If Cancel = False Then
Application.Quit
End If
End Sub