I have made a User form in Excel, so when i open the xlsm-file it only opens the user form, and the workbook is hidden.
But when i close the user form with the [X]-button I want it to close both the workbook and the user form without saving.
When I close the user form now, and try to open the same file again, it says that it is already/stil open.
Start up code:
Private Sub Workbook_Open()
Application.Visible = False
Fordelinger.Show vbModeless
End Sub
Close code:
Private Sub Fordelinger_Deactivate()
Application.Quit
Workbooks("EstimatDOK.xlsm").Close True
End Sub
Can anyone help? :)