Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide Excel 2010 UserForm when sheet behind is clicked 1

Status
Not open for further replies.

PWD

Technical User
Jul 12, 2002
823
GB
Good afternoon, is it possible to 'hide' a UserForm when it loses focus, i.e. when the sheet behind is clicked & regains focus?

BTW this form becomes visible courtesy of
Code:
Private Sub Workbook_SheetActivate(ByVal Sh As Object)

It no big deal if it can't, I just fancied adding it in if it could.

Many thanks,
D€$
 


hi,
Code:
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
    UserForm1.Hide
End Sub

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
    UserForm1.Hide
End Sub

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Hi Skip I'll have a look at this tomorrow.

Many thanks,
D€$
 
Or next-week's tomorrow!!

Heck
Code:
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
    UserFormExclusions.Hide
End Sub
does the trick. STAR!!!!

Many thanks,
D€$
 
Well bless my soul Skip. That certainly did do the trick! Many apologies for not acknowledging it at the time.

Many thanks,
D€$
 
[tt]

May your soul be blessed, not un-irregardless! [ponder]
[/tt]


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Y'all bin listenin' too much ta George W!

Many thanks,
D€$
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top