Custom Form

S

Slim Slender

I am using Excel 2007 on Windows XP with dual monitors. I have a work
book that is to be shared that has a form that I built. The form is
not modal but I am unable to switch to another workbook in Excel when
the form is displayed. I figured out that I can switch back and forth
between two workbooks when the second one is in a separate instance of
Excel. So I am wondering if I can have Excel and one workbook open
then open a second wb and force it to open a second instance of Excel.
 
A

Alan

I am using Excel 2007 on Windows XP with dual monitors. I have a work
book that is to be shared that has a form that I built. The form is
not modal but I am unable to switch to another workbook in Excel when
the form is displayed. I figured out that I can switch back and forth
between two workbooks when the second one is in a separate instance of
Excel. So I am wondering if I can have Excel and one workbook open
then open a second wb and force it to open a second instance of Excel.

Could I just ask, why do you need to have your form open whilst you
are trying to switch to the 2nd workbook?
 
S

Slim Slender

Could I just ask, why do you need to have your form open whilst you
are trying to switch to the 2nd workbook?

Turns out it isn't necessary to open another instance of Excel.
What I do need is a way of preventing a user from using Alt+F8 and Alt
+F11 and seeing or using macros except for one macro.
 
A

Alan

Turns out it isn't necessary to open another instance of Excel.
What I do need is a way of preventing a user from using Alt+F8 and Alt
+F11 and seeing or using macros except for one macro.

There are at least three ways of hiding a macro.

1. define the macro(s) as Private
2. place the macro(s) in an addin
3. define the macro to be hidden with a dummy variable e.g.

Sub HiddenMacro(byval dummy as integer)

... code as normal ...

End Sub

Then call this from your master sub

Sub Master

... code as normal ...

Call HiddenMacro(1)
' (the 1 is a dummy variable and has no use other than hidding the
above macro)

.... code as normal ...

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top