I have the following script which locks my userform to the screen so that if I change applications to Internet Explorer or whatever other application I still have my userform on the screen, like a toolbar.
The problem I have is that when it is locked it will not update unless I manually click on the userform whereas I want it to update when i.e. cells change, I have tried using scripts like me.textbox1.value="Whatever" or uf.textbox1.value="whatever" or updating1.textbox1.value= "whatever" but the userform does not update.
Can someone please help.
The problem I have is that when it is locked it will not update unless I manually click on the userform whereas I want it to update when i.e. cells change, I have tried using scripts like me.textbox1.value="Whatever" or uf.textbox1.value="whatever" or updating1.textbox1.value= "whatever" but the userform does not update.
Can someone please help.
Code:
Option Private Module
Option Explicit
Private Declare Function SetWindowPos Lib "user32" ( _
ByVal hwnd As Long, _
ByVal hWndInsertAfter As Long, _
ByVal X As Long, _
ByVal Y As Long, _
ByVal cx As Long, _
ByVal cy As Long, _
ByVal wFlags As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Private Const HWND_TOPMOST = -1
Sub Updating()
Dim fs, objFolder
Set fs = CreateObject("Scripting.FileSystemObject")
If fs.FolderExists("\\IBSSBS\Users\jtait\My Documents\Various A-Z\CC Registry Logs\CC\Personal") Then
Dim UF As Updating1
Dim UFHandle As Long
Set UF = New Updating1
UFHandle = FindWindow("ThunderDFrame", UF.Caption)
SetWindowPos UFHandle, HWND_TOPMOST, UF.Left, UF.Top, UF.Width, UF.Height, 0&
UF.Show
End Sub