Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Shell function

I am trying to shell to a Windows help file (.chm) from a Excel worksheet,
....however, it doesn't seem
to work. Shell works for notebook, calculator, etc.,but not a .chm file. How
can I get VB to open this help file from within a macro button placed on a
Excel form..
Jjk


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Shell function

"John Keturi" wrote in message
news:jcSrc.15633$PU5.6123@fed1read06...
I am trying to shell to a Windows help file (.chm) from a Excel worksheet,
...however, it doesn't seem
to work. Shell works for notebook, calculator, etc.,but not a .chm file.

How
can I get VB to open this help file from within a macro button placed on a
Excel form..


Hi John,

There are a couple of ways you can do this. The Application.Help method
will display the file:

Application.Help ThisWorkbook.Path & "\MyHelpFile.chm"

I don't like this method because it tries to automatically tile the help
file and Excel windows, so I use the HtmlHelp API instead:

Public Declare Function HtmlHelpA Lib "hhctrl.ocx" _
(ByVal hwnd As Long, _
ByVal lpHelpFile As String, _
ByVal wCommand As Long, _
ByVal dwData As Long) As Long

Sub DisplayHelpFile()
HtmlHelpA 0&, ThisWorkbook.Path & "\MyHelpFile.chm", 0&, 0&
End Sub

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Batch file in Shell Function Eric[_14_] Excel Programming 2 November 14th 03 11:08 PM
Shell function II [email protected] Excel Programming 1 September 19th 03 05:55 PM
Shell function II Don Guillett[_4_] Excel Programming 1 September 19th 03 03:31 PM
Shell function David Excel Programming 0 September 19th 03 11:30 AM
use shell function in vbscript Sofia Excel Programming 0 July 21st 03 06:29 PM


All times are GMT +1. The time now is 01:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"