LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 215
Default Open Only the User Form ... or Close Everything !

Hello;

Workbook Book1.xls opens a user form named myUserForm.

I'm trying to show only the user form on the desktop when I open Book1.xls,
with Book1.xls minimized on the Taskbar.
And , if the Cancel button on the form is clicked, then unload the form and
close Book1.xls. That simple!

In ThisWorkbook, I have the event:

Private Sub Workbook_Open()
ActiveWindow.WindowState = xlMinimized
ShowTheForm
End Sub

On the Form, I have the Cancel button:

Private Sub btnCancel_Click()
Unload Me
ThisWorkbook.Close True
End Sub


The above procedure shows the form, with Microsoft Excel blank window in the
background, and produces a small bar at the bottom left of the screen for
Book1.xls.
Click the Cancel button on the form, and both the Form and Book1.xls close,
but the blank Excel window remains open in the background !!!!

I suppose I would not be able to edit such version of Book1.xls, but that is
fine for now!

Your suggestion(s) would be greatly appreciated.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Close User Form Gazz_85[_2_] Excel Discussion (Misc queries) 1 July 8th 09 10:38 AM
See User Form On Open wx4usa Excel Discussion (Misc queries) 13 October 23rd 08 02:56 PM
Open Specific Form by User Login Bowtie63 Excel Discussion (Misc queries) 1 November 30th 07 12:21 AM
Open a user form Pietro Excel Discussion (Misc queries) 1 August 29th 07 12:03 PM
use a button to open a user form? Hru48 Excel Discussion (Misc queries) 1 September 1st 05 07:41 PM


All times are GMT +1. The time now is 12:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"