Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ZAK ZAK is offline
external usenet poster
 
Posts: 6
Default Forms Display

Hi

I am displaying a warning form for a user when the cell
reaches a critical value. However I would like the form to
be at the forefront of all windows application, so that
the user has to acknowledge before he can resume to use
the computer. I am thinking in cases where the Excel is
minimised.

Regards

ZAK
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Forms Display

Zak,

Try the following, for Excel 2000 and later.

Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Declare Function SetForegroundWindow Lib "user32" ( _
ByVal hwnd As Long) As Long

Sub ShowTheForm()
Dim FHwnd As Long
Load UserForm1
FHwnd = FindWindow("ThunderDFrame", UserForm1.Caption)
If FHwnd Then
SetForegroundWindow FHwnd
End If
UserForm1.Show
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"ZAK" wrote in message
...
Hi

I am displaying a warning form for a user when the cell
reaches a critical value. However I would like the form to
be at the forefront of all windows application, so that
the user has to acknowledge before he can resume to use
the computer. I am thinking in cases where the Excel is
minimised.

Regards

ZAK



Reply
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
How to display a hh:mm:ss cell value in a forms text control Parvaiz Excel Discussion (Misc queries) 5 February 28th 09 09:52 PM
can you change the font of a check box display (forms)? billofsoo Excel Discussion (Misc queries) 6 May 3rd 08 04:43 PM
How to display remaining txt file which overflowed MsgBox display? EagleOne Excel Discussion (Misc queries) 1 November 2nd 06 01:10 PM
how to display single database records into forms for printing need help Excel Discussion (Misc queries) 1 July 6th 05 01:42 AM
create excel spreadsheet to display data from filled text forms pluck4me Excel Discussion (Misc queries) 0 April 20th 05 08:37 PM


All times are GMT +1. The time now is 08:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"