Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to display a hh:mm:ss cell value in a forms text control | Excel Discussion (Misc queries) | |||
can you change the font of a check box display (forms)? | Excel Discussion (Misc queries) | |||
How to display remaining txt file which overflowed MsgBox display? | Excel Discussion (Misc queries) | |||
how to display single database records into forms for printing | Excel Discussion (Misc queries) | |||
create excel spreadsheet to display data from filled text forms | Excel Discussion (Misc queries) |