Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 290
Default Really Really Stumped!

Hi all,

Ive finally got my form to display properly by using .show vbmodless
and application.visible = false and im also using part of formfun (the
cbmodal values which im not really sure what they do but that not
important)

So my form opens up on the desktop looking all standalone and on its
own, if a user opens excel the app (like off the start bar) then they
can use the big red x to close that instance and my form remains, yet
if they just double click on a workbook to open it will open up in my
instance?! so when they close it by the big red x it also closes my
form!

Im not sure if there is anything I can do about this, but really I want
the users to open another workbook if they want, and for it to be
completely seperate to my form one so that they can close or whatver
they want and it will not affect my modeless form.

Is this possible? any ideas anyone?

Duncan

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Really Really Stumped!

Before you show your userform and hide the application do you do

Application.IgnoreRemoteRequests = True

--
Regards,
Tom Ogilvy


"Duncan" wrote:

Hi all,

Ive finally got my form to display properly by using .show vbmodless
and application.visible = false and im also using part of formfun (the
cbmodal values which im not really sure what they do but that not
important)

So my form opens up on the desktop looking all standalone and on its
own, if a user opens excel the app (like off the start bar) then they
can use the big red x to close that instance and my form remains, yet
if they just double click on a workbook to open it will open up in my
instance?! so when they close it by the big red x it also closes my
form!

Im not sure if there is anything I can do about this, but really I want
the users to open another workbook if they want, and for it to be
completely seperate to my form one so that they can close or whatver
they want and it will not affect my modeless form.

Is this possible? any ideas anyone?

Duncan


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 290
Default Really Really Stumped!

Yep, tried this but still same problems.....I really dont have a clue
what to do!

Duncan

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Really Really Stumped!

I use the following method that you maybe able to adapt, on opening your
primary application it determines if there are other Excel workbooks open,
and asks the user to close them first. If not then it closes all other
Excel files, this will be other auto open workbooks e.g. Personal.xls. When
this application (Dashboard.xls in my case) is running opening another
workbook will deactivate my application and trigger the test again. HTH

Option Explicit
Public wbOpen As Boolean
Private Sub Workbook_Deactivate()
If Workbooks.Count 1 And wbOpen Then


Application.ScreenUpdating = True

Application.DisplayAlerts = False
ActiveWorkbook.Close
Application.DisplayAlerts = True

MsgBox "You must close the Dashboard before opening another workbook" &
vbCrLf & _
"If you wish to copy tables from the Dashboard, open another instance
of Excel", vbExclamation + vbOKOnly, "Dashboard Messaging"
'close the rogue book

End If

End Sub


Private Sub Workbook_Open()

Application.ScreenUpdating = False

' if user has a personal.wks in xlstart directory - close it!
Dim wb As Workbook
For Each wb In Application.Workbooks
If UCase(wb.Name) < "DASHBOARD.XLS" Then
Application.DisplayAlerts = False
wb.Close
Application.DisplayAlerts = True
End If
Next

' control if another workbook is opened by a double click in explorer
wbOpen = True
If Workbooks.Count 1 Then
MsgBox "You must close the current Excel workbooks before opening
the Dashboard" & vbCrLf & _
"If you wish to copy tables from the Dashboard, close Excel and
open the Dashboard first" & vbCrLf & _
"then open another instance of Excel", vbExclamation + vbOKOnly,
"Dashboard Messaging"
wbOpen = False
Application.DisplayAlerts = False
ActiveWorkbook.Close
Application.DisplayAlerts = True
End If

End Sub










--
Cheers
Nigel



"Duncan" wrote in message
oups.com...
Yep, tried this but still same problems.....I really dont have a clue
what to do!

Duncan



Reply
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
Stumped GD Excel Discussion (Misc queries) 4 January 21st 08 02:12 PM
STUMPED Suzanne Kelzer Excel Worksheet Functions 2 June 21st 07 03:36 PM
Stumped Jake Excel Discussion (Misc queries) 4 November 21st 06 01:09 PM
I'm stumped [email protected] Excel Discussion (Misc queries) 0 September 18th 06 09:04 PM
I'm Stumped ExcelBob[_2_] Excel Programming 7 May 25th 06 12:11 PM


All times are GMT +1. The time now is 04:15 AM.

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

About Us

"It's about Microsoft Excel"