N
new_to_vba
having trouble with the following code,
Private Sub UserForm_Initialize()
' Title bar is a skin -> resize UserForm dimensions
Me.Height = Me.InsideHeight + ((Me.Width - Me.InsideWidth) / 2)
Me.Width = Me.InsideWidth
hWnd = FindWindow(vbNullString, Me.Caption)
SetWindowLong hWnd, -16, &H84080080 ' No caption
SetWindowLong hWnd, -20, &H40000 ' No borders
End Sub
when i open my workbook i get a compile error, sub or function not defined.
with the findwindow highlighted.
any help would be great. new_to_vba
Private Sub UserForm_Initialize()
' Title bar is a skin -> resize UserForm dimensions
Me.Height = Me.InsideHeight + ((Me.Width - Me.InsideWidth) / 2)
Me.Width = Me.InsideWidth
hWnd = FindWindow(vbNullString, Me.Caption)
SetWindowLong hWnd, -16, &H84080080 ' No caption
SetWindowLong hWnd, -20, &H40000 ' No borders
End Sub
when i open my workbook i get a compile error, sub or function not defined.
with the findwindow highlighted.
any help would be great. new_to_vba