View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default close .chm with form

The hwnd you need to be concerned with is that of the .chm, not the
userform, and then only for use with a the IsWindow API to check the .chm is
still open before using the html help API to close it (AFAIK).

Const HH_CLOSE_ALL = &H12

If IsWindow(previously trapped .chm hwnd) Then
HTMLHelp 0&, vbNullString, HH_CLOSE_ALL, 0&
End If

Regards,
Peter T


"ckoch" wrote in message
ups.com...
If userforms are windoless controls and don't have a hwnd, how do you
close your .chm help file without being able to pass the .hwd of the
form?