LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Bring my modeless userform to the foreground???

I haven't followed all this thread but if the form is already loaded as
modeless you must include the modeless argument again to re-show it (because
the default is modal).

If the objective is to bring it to the front there are API ways but
following can simply solve some other difficulties.

With UserForm1
..Hide
..Show vbModeless
End With

This assumes you already know the form is loaded and visible

Regards,
Peter T

"Robert Crandal" wrote in message
...
So, would my code roughly look like this:

If Not MySpecialFormLoaded("UserForm1") Then
UserForm1.Show vbModeless
Else
UserForm1.Show ' Just show it if it's already loaded
End If

Is that what you mean??


"Rick Rothstein" wrote in message
...
UserForm1.Show, by itself, does not create new instances of your
UserForm... you must be running the code you showed us each time you
click the button too... don't do that... put an If..Then test to see if
the UserForm is visible... if it is, just execute the UserForm1.Show
command, otherwise run the code you posted previously to load/show it.

--
Rick (MVP - Excel)




 
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
Modeless Userform Roger Excel Programming 2 March 10th 08 08:01 PM
Clicking on chart does not bring to foreground Eric Charts and Charting in Excel 1 August 9th 07 10:12 PM
Modeless userform hngo New Users to Excel 2 July 13th 05 09:23 AM
How do I Bring a window to the foreground? *outlook warning [email protected] Excel Programming 2 December 22nd 04 01:01 AM
modeless userform jacob Excel Programming 1 May 4th 04 02:53 PM


All times are GMT +1. The time now is 11:46 PM.

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"