Hi;
I'm trying to run a module with a function that just
opens a .hlp (help) file. I can't use the
provided "help" utility from the custom toolbar because
before the file opens, I get a message that the file may
contain viruses, blah, blah. BS from MS! Obviously, I
don't want my customers to see that message before the
help file "tree" comes up. I went out to the knowledge
base about this message and found out there's no way to
get rid of it. I'm more than just a little aggrevated
with Microsoft. So, in the past three days I've posted
quite a few questions out here.
PROBLEM: I have been programming mainframes for 20+
years, but I don't understand functions at all. I have
been getting some help out here, but none of it seems to
work. I will get a compile error, or other MS Access
message meaning I don't have the function right.
This is the latest error I've been getting:
"Microsoft Access can't find the name '<<PathDirName>>'
you entered in the expression. Folling is the code of
the module. I call the first function first and then get
the error on the second function. Can anybody tell me
what I'm doing wrong? For all of you who have helped me
before, I am gratefull... just can't seem to get it
working even with your help.
-------------------------------------------------------
Option Compare Database
Public PathDirName As String
Function SetValue()
PathDirName = "C:\Access Projects\Development PP1.5
\ProjectST15.hlp"
End Function
'The next function is supposed to open the help file
'without the Microsoft "virus" warning, but it's tripping
'over PathDirName. I don't know if the rest of the code
'will work either.
Function wshRun(PathDirName As String)
Dim wShell As Object 'wshShell
Set wShell = CreateObject("WScript.Shell")
If Left(PathDirName, 1) <> Chr(34) Then
PathDirName = Chr(34) & PathDirName & Chr(34)
End If
wshRun = wShell.Run(PathDirName)
Set wShell = Nothing
End Function
---------------------------------------------------------
Later on, in the first function, I am going to load the
path/directory that my frontend resides on, but for now I
just want to hardcode it, get it working and see if it
gets rid of the BS from MS message.
Thanks to everyone again, (can you tell I'm getting
PO'd?
Dan