Page 1 of 1

MS Access 2007 VB ?

Posted: 17 Aug 2010, 06:44
by Mclaren
I am trying to open a *.hlp file from within MS Access 2007. I have already installed the update that allows me to view *.hlp files in Win7. I just need the code to allow me to open the file.

Current code
Private Sub cmd_Help_Click()
Shell ("C:\Program Files\Project\WTF.hlp")
End Sub
This code pops up the following :
Run-time error '5':
Invalid procedure call or argument

Re: MS Access 2007 VB ?

Posted: 17 Aug 2010, 06:46
by Tribble
No idea - but I will ask around for you

Re: MS Access 2007 VB ?

Posted: 17 Aug 2010, 06:50
by doo_much
I suck at programming but try it like this?

Code: Select all

Private Sub cmd_Help_Click()

Dim Whtever As Integer
   
Whtever = Shell("C:\Program Files\Project\WTF.hlp", AppWinStyle.NormalFocus)

End Sub

Re: MS Access 2007 VB ?

Posted: 17 Aug 2010, 07:02
by Mclaren
Nope, now i have
Runtime error 424
object required

Re: MS Access 2007 VB ?

Posted: 17 Aug 2010, 07:11
by doo_much
Well I can only guess. Is the hlp file in the expected location?

Guess you'll have to stick around till the real programmers pitch? ;)