Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, Does anyone know how to freeze the active window using windows API? I tried this: Class named FreezeWindow: Option Explicit Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _ (ByVal ClassName As String, ByVal WindowName As String) As Long Private Declare Function LockWindowUpdate Lib "user32" _ (ByVal hWndLock As Long) As Long Public Sub Freeze(Window As Window) Dim hWnd As Long hWnd = FindWindow("XLMAIN", Application.Caption) End Sub Public Sub Unfreeze() LockWindowUpdate 0 End Sub Private Sub Class_Terminate() Unfreeze End Sub and in the macro: dim FreezeWnd as New FreezeWindow FreezeWnd.Freeze ActiveWindow FreezeWnd.Unfreeze I can't get it to work, don't know what's wrong (still learning VBA). Thanks in advance Mik -- Mikeyhen ----------------------------------------------------------------------- Mikeyhend's Profile: http://www.excelforum.com/member.php...fo&userid=3340 View this thread: http://www.excelforum.com/showthread.php?threadid=56442 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I freeze/ unfreeze a window pane in Excel 2007? | Excel Discussion (Misc queries) | |||
view excel worksheet & freeze internet window synchronously | Excel Worksheet Functions | |||
Window Tool Bar - Freeze pane does not appear | Excel Discussion (Misc queries) | |||
Excel: find Window in which I can freeze panes | New Users to Excel | |||
Excel should allow me to freeze pane in a split window | Excel Worksheet Functions |