hide application for one workbook

M

Mark

When i open my file running userform. I operate only in
userform. I want hide application and work on userform:
Application.Visible = False
it's work
but this code unenable show another workbook (sheet) who
run after.
I'd like hide only application with my userform.
Is Excel allow for this action?

Regards
Mark
 
B

Bob Phillips

Mark,

Do you want to make it visible when the form closes? If so, just issue an
Application.Visible = True in the closedown


Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
Application.Visible = True
End Sub

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
M

Mark

Thanks for reply.
Bob, i have commandbutton (in userform)to exit userform
and workbook,
i'd like hide application (only with this specific
userform), in another open workbook i want
Application.Visible = true

Unfortunatelly code
Activeworbook.visible = false
doesn't support properties


on queryclose i had code:
Private Sub UserForm_QueryClose _
(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
MsgBox "You don't close it"
Cancel = True
End If
End Sub


Best Regards
Mark
 
B

Bob Phillips

Mark,

Not sure I am entirely with you here. Are you saying that you cannot do what
I suggest as you already have code in QueryClose? If so, how does the form
get closed down, your code stops it in all cases.


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
M

Mark

I close userform and workbook by cbClose, i operate after
open workbook only on userform..

sub cbClose ()
Unload Me
' stuff
ActiveWorkbook.Save
ActiveWorkbook.Close
end Sub


thanx Bob for you help
Mark
 
M

Mark

of course cbClose_Click () ' commandbuttom
-----Original Message-----
I close userform and workbook by cbClose, i operate after
open workbook only on userform..

sub cbClose ()
Unload Me
' stuff
ActiveWorkbook.Save
ActiveWorkbook.Close
end Sub


thanx Bob for you help
Mark
that
you cannot do what only (sheet)
.
 

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