Close workbook with Userform
<p>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.</p>

<p>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.</p>

<p>When I close the user form now, and try to open the same file again, it says that it is already/stil open.</p>

<p>Start up code:</p>

<pre><code>Private Sub Workbook_Open()
 Application.Visible = False
 Fordelinger.Show vbModeless
End Sub
</code></pre>

<p>Close code:</p>

<pre><code>Private Sub Fordelinger_Deactivate()
Application.Quit
Workbooks("EstimatDOK.xlsm").Close True
End Sub
</code></pre>

<p>Can anyone help? :)</p>