Originally Posted by
Olwa
...It does however cause problems if the user already opened other excel workbooks. Only idea i got so far is unhiding by using Application.Visible = True as the user clicks an image used to close the userform. Not the best solution though as he can't work with other excel sheets while using my userform...
Greetings,
I'm not sure if you are trying to hide the entire app, or just the workbook. If the latter, maybe something along the lines of:
ThisWorkbook Code:
Option Explicit
Private frmUserForm1 As UserForm1
Private Sub Workbook_Open()
Set frmUserForm1 = New UserForm1
ThisWorkbook.IsAddin = True
frmUserForm1.Show vbModeless
End Sub
Userform Code:
Option Explicit
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
ThisWorkbook.IsAddin = False
End Sub
Hope that helps,
Mark