If I understand you correctly, what you are asking can't be done with Excel.
An open workbook must have at least one visible sheet. If you close the
workbook, your userform is unloaded also.
You could make all the sheets exept one blank sheet xlVeryHidden. In the
VBA, password protect the project. Have a Workbook_Open event turn off
ScreenUpdating after displaying your userform. Of course, the event won't
fire (and your userform won't be displayed) if the user disables macros - and
ulimately, you can't prevent that.
You could do what you describe using VB6 or
VB.Net.
Hope this helps,
Hutch
"cedtech23" wrote:
I created a userform called frmLeaveRequest that I want to start when
the user double clicks on the excel file
Code:
--------------------
Private Sub Workbook_Open()
frmLeaveRequest.Show
End Sub
--------------------
I don't want the worksheet to be visible to the user, just the
userform
How can I do this?
I also want to close the active workbook and Excel if there are no
other active workbook. What else do I have to and to this code to
accomplish this??
Code:
--------------------
Private Sub cmdExit_Click()
ActiveWorkbook.Close
End Sub
--------------------
--
cedtech23
------------------------------------------------------------------------
cedtech23's Profile: http://www.excelforum.com/member.php...o&userid=31022
View this thread: http://www.excelforum.com/showthread...hreadid=563330