Do you have ScreenUpdating set to false? This will often cause the behaviour you've described for dragging the form around.
Alternatively it could just be that you computer is trying to process more things at that point than its happy with and it doesn't quite get the screen refesh right. If this is the case you could try using
Code:
Application.DoEvents
or alternatively you could bring the full wrath of the Windows operating system (WinAPI) to bear on the matter by using:
Code:
Declare Function FindWindow _
Lib "user32" _
Alias "FindWindowA" ( _
ByVal lpClassName As String, _
ByVal lpWindowName As String) _
As Long
Declare Function FindWindowEx _
Lib "user32" _
Alias "FindWindowExA" ( _
ByVal hWnd1 As Long, _
ByVal hWnd2 As Long, _
ByVal lpsz1 As String, _
ByVal lpsz2 As String) _
As Long
Declare Function InvalidateRect _
Lib "user32" ( _
ByVal hWnd As Long, _
lpRect As Long, _
ByVal bErase As Long) _
As Long
Declare Function UpdateWindow _
Lib "user32" ( _
ByVal hWnd As Long) _
As Long
Sub RepaintActiveWindow()
Dim hWnd As Long
Dim strExcel As String
strExcel = "EXCEL" & Format(Application.Version, "#0")
Application.ScreenUpdating = True
' Find Excel
hWnd = FindWindow("XLMAIN", Application.Caption)
' Find the active window in Excel
hWnd = FindWindowEx(hWnd, 0, strExcel, ActiveWindow.Caption)
' Mark the client area 'dirty'
InvalidateRect hWnd, 0&, True
' Force a redraw
UpdateWindow hWnd
End Sub
Of course both of the above solutions require you to determine a point in your code to do a refresh.
Maccas