View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
new_to_vba new_to_vba is offline
external usenet poster
 
Posts: 16
Default re-post border on userforms

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