Userform to be always on top of all Applications?

  • Thread starter Thread starter George J
  • Start date Start date
G

George J

Not sure if this is possible, especially as i am using
Excel97. But what i want is my userform to be the top
window (always visible/active) even if other applications
are open.

eg user is using the userform then decides to open windows
explorer - userform stays on top so the user has to close
down the userform before they can go on to do something
else.

I know alot of you will shrink back from the thought of
doing this to a user, but i think it will save alot of
problems for me later on.

I can't use hwnd so tried hWnd = FindWindow
("ThunderXFrame", Me.Caption) with dim hwnd as long
and can do a little more, but do not really have a clue
how to go about making a dominant userform.

I have some code taken from various sources, but am
creating a real mess. If anyone can assist i would be
grateful.

George
 
hi,
I am not sure how you open you form, i open my form with a
button. however you open your form, replace your old code
this code below.

Private Sub cmdshowcal_Click()
Load frmCalendar
frmCalendar.Show 0
AppActivate Application.Caption
End Sub

once open, i can go from form to sheet and back. other
things work too like find, open file ect.
the form will always be on top of excel but not other
applications. sorry.
 
Thanks for trying, but i am using Excel97 which does not
seem to have these modal switches.

thanks anyway
George
 

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

Back
Top