james.benham
New Member
- Joined
- Jul 1, 2009
- Messages
- 6
Sorry its a long post.....
Hi All,
I'm having a few problems with a UserForm I'm trying to create. This userform runs, with the excel sheet it is running from hidden behind.
Below I have summarised the form itself, the problem I have encountered and solutions I have already tried. Any input would be infinitely helpful.
Summary of Form
- A project manager's dashboard
- It is meant to look like a standalone application that runs in the background of the users machine on startup
- Essentially it is a form with a bunch of buttons on, the captions and URLS of these buttons are stored in the only worksheet ("Dashboard Settings") of the workbook ("PMDash.xls").
- The reason for this is so the captions and links can be changed by someone not acustomed to working with MVB editor.
- Means that user can click a link and it opens a prespecified file location.
- On computer startup the excel book opens, hides itself and then runs the useform "dashboard".
Problem
I use the following code in the workbook:
... in order to hide the settings sheet and run the dashboard.
Everything works fine, the dashboard opens, the application vanishes and the useform remains - looking like a standalone program.
The problem is - if a user opens another excel workbook then it opens in the same application/instance and unhides "PMDash.xls". I want PMDash to remain completely hidden.
Solutions?
A solution I thought up originally was to hide the workbook as well by using:
This does the trick - even if they open another workbook, it opens in the same application window but PMDash.xls remains hidden. This, however, gives rise to a new problem in that if the user then uses the large 'X' to close the application it closes PMDash as well.
My current working solution is that when PMDash is opened for the first time (on startup) it opens a new instance of excel as well. Both the PMDash instance and the new instance (lets call it instance 2) are made to be hidden. I have determined that when a user opens a workbook it is opened in the most recent instance. Doing the above will mean that if they open an existing sheet it will open in instance 2 and therefore not effect PMDash. This gives rise to another problem - if they close that instance then any future files they open will open in the PMDash instance and I am back to square one.
Other possible solutions:
1) Forcing all new files to open in a new instance (VBA only as I do not have access to all users' computers)
2) Working on the basis of my first solution that the sheet remains very hidden, a code that will activate if the instance starts to close and either makes sure that PMDash remains open or that PMDash reopens and hides itself immediately??
Unfortunately this is all a little out of my depth now.
In summary: I need a code that will either prevent a user from accessing a hidden worksheet or a code to ensure they cannot close it.
Any ideas?
Notes:
Operating Windows XP Service Pack 3
Excel Version 2003, although 2007 is also installed.
Hi All,
I'm having a few problems with a UserForm I'm trying to create. This userform runs, with the excel sheet it is running from hidden behind.
Below I have summarised the form itself, the problem I have encountered and solutions I have already tried. Any input would be infinitely helpful.
Summary of Form
- A project manager's dashboard
- It is meant to look like a standalone application that runs in the background of the users machine on startup
- Essentially it is a form with a bunch of buttons on, the captions and URLS of these buttons are stored in the only worksheet ("Dashboard Settings") of the workbook ("PMDash.xls").
- The reason for this is so the captions and links can be changed by someone not acustomed to working with MVB editor.
- Means that user can click a link and it opens a prespecified file location.
- On computer startup the excel book opens, hides itself and then runs the useform "dashboard".
Problem
I use the following code in the workbook:
Code:
Private Sub Workbook_Open()
Application.Visible = False
dashboard.Show
End Sub
Everything works fine, the dashboard opens, the application vanishes and the useform remains - looking like a standalone program.
The problem is - if a user opens another excel workbook then it opens in the same application/instance and unhides "PMDash.xls". I want PMDash to remain completely hidden.
Solutions?
A solution I thought up originally was to hide the workbook as well by using:
Code:
Windows("PMDash.xls").Visible = False
My current working solution is that when PMDash is opened for the first time (on startup) it opens a new instance of excel as well. Both the PMDash instance and the new instance (lets call it instance 2) are made to be hidden. I have determined that when a user opens a workbook it is opened in the most recent instance. Doing the above will mean that if they open an existing sheet it will open in instance 2 and therefore not effect PMDash. This gives rise to another problem - if they close that instance then any future files they open will open in the PMDash instance and I am back to square one.
Other possible solutions:
1) Forcing all new files to open in a new instance (VBA only as I do not have access to all users' computers)
2) Working on the basis of my first solution that the sheet remains very hidden, a code that will activate if the instance starts to close and either makes sure that PMDash remains open or that PMDash reopens and hides itself immediately??
Unfortunately this is all a little out of my depth now.
In summary: I need a code that will either prevent a user from accessing a hidden worksheet or a code to ensure they cannot close it.
Any ideas?
Notes:
Operating Windows XP Service Pack 3
Excel Version 2003, although 2007 is also installed.
Last edited: