Hi,

I have a userform which I would like to open in new instance and also
minimize excel so only the userform is visible. I am using excel 2007
to write the codes but am saving it as excel2003. later i will need to
create both versions for people with differnet versions (if it does
not run on excel 2007). So far I got it to open in a new instance but
there are problems:

1- If an excel file is already open, then after I open my file the
userform shows. when I try to go back to the first excel file to do
something the window is black and basically not accessable unless i
finish with the userform or close it.

2- If there are no other excel files open and I open this file, then
if I try to open other files, to check something, nothing happens and
no file opens till I finish with this userform or close it.

I also tried  Application.IgnoreRemoteRequests = True  but it creates
lots of problems so I took it off my codes.

Ultimately my goal is to be able to open work on other excel files
even if I am not finished with the userform.
I appreciate your help in advance.

Here is my code from ThisWorkbook (please let me know if I need to
send the whole file):
the commented lines are my different tries that did not work.

---------------
Private Sub Workbook_Open()
Dim xlApp As New Application
Set xlApp = CreateObject("Excel.Application")
ThisWorkbook.Sheets(1).Visible = xlVeryHidden
ThisWorkbook.Sheets(2).Visible = xlVeryHidden
ThisWorkbook.Sheets(3).Visible = xlVeryHidden
On Error Resume Next
Application.ScreenUpdating = False
'Application.WindowState = xlMinimized
'ThisWorkbook.Activate
ActiveWindow.WindowState = xlMaximized
'Application.Visible = False
frmSCF.Show


Private Sub Workbook_BeforeClose(Cancel As Boolean)
'Application.IgnoreRemoteRequests = False
If Application.WORKBOOKS.Count = 1 Then
Application.Quit
End If
End Sub

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to [email protected]
If you find any spam message in the group, please send an email to:
Ayush Jain  @ [email protected] or
Ashish Jain @ [email protected]
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe

Reply via email to