Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Calling .chm file

Posted on 2001-06-04
3
394 Views
Last Modified: 2011-10-03
I created a .chm file i.e html help file.

i want to invoke it thru VB 6.0

Please let me know how do i do so.

Thanx
0
Comment
Question by:archnaashish
3 Comments
 
LVL 51

Expert Comment

by:Ryan Chong
ID: 6155012
Hi, try this:

___________________________________________________

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Declare Function GetDesktopWindow Lib "user32" () As Long

Private Function StartDoc(ByVal FileName As String) As Long
    Dim Scr_hDC As Long
    Scr_hDC = GetDesktopWindow()
    'change "Open" to "Explore" to bring up file explorer
    StartDoc = ShellExecute(Scr_hDC, "Open", FileName, "", "C:\", 1)
End Function

Private Sub Command1_Click()
    Dim i As Long
    i = StartDoc("C:\Program Files\Microsoft Visual Studio\MSDN98\98VS\1033\Adodc98.chm")
End Sub

'Hope will help.
0
 
LVL 1

Accepted Solution

by:
venkatg76 earned 50 total points
ID: 6155017
We can do like this,
App.HelpFile = "test.chm"


0
 

Author Comment

by:archnaashish
ID: 6155038
Thanx it did work
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
A macro to Count the number of rows across all worksheets 3 126
Add a task in Outlook from access 11 42
Macro Excel - Multiple If conditions 2 81
Advice in Xamarin 21 97
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question