?
Solved

Pass value to non-running VB program (more points to come)

Posted on 2000-03-29
8
Medium Priority
?
178 Views
Last Modified: 2010-05-02
Sorry for the low points. With EE's server change, I lost about 20 of them. I'll up it as I get more over the coming days.

I have a series of help files called from a large program. The way the program is set up, it requires that the help files be in a specific directory relative to the application, and I can't change that.

I also provide, within the help files, a link as a means to allow the clients to write their own help files to supplement the help files I provide. Each help screen in my file (there are about 15,000) makes a call to the client-created help file, passing the help context string that matches the calling screen.

Given that different clients at different sites have different configurations, these links require that the client's help files appear in the same directory as the help file we provide (or at least a consistent relative path). This irks the clients, as it requires that, when they update their help files, each new help file must be distributed to the proper directory on hundreds (if not thousands) of user PCs.

It would be (relatively) easy to change my 15,000 links to invoke a vb program (or other executable), and have that call the client's customized help file from some central server. But I don't know how to pass that context string value to the vb app so that the vb app can then invoke the correct help screen.

Given that the call to the client's customized help file is:
'Client1.hlp>linkage',CL85
where Client1.hlp is the help file and CL85 is the help context string, if I were to change this to:

'HelpCall.exe>linkage',CL85
(or some variation thereof), where HelpCall.exe is the vb app, what would I do when writing HelpCall to capture the CL85, so I could pass it as a context string to the custom help file?

In a worst-case scenario, I could modify my help files to write the context string to a text file (or ini or something) and then invoke the vb application, which would read the file to determine the context string to call. But that's a performance issue I don't want to have to face.

Any help would be appreciated and rewarded accordingly (as soon as I get more points!).

-- b.r.t.
0
Comment
Question by:BarryTice
[X]
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
  • 4
  • 3
8 Comments
 
LVL 4

Accepted Solution

by:
gcs001 earned 200 total points
ID: 2667112
I'm not sure that I understand your question correctly, but it seems that you want to be able to pass a command line parameter to a VB program.

To access this parameter in your VB program all you need to do is call the
Command() function - this returns any command line parameters you may have passed to the program.

as in:
Dim ContextString as String
ContextString = Command()

You could put this either in your Form Load event or your Sub Main, whichever you're using.

Regards,
Grant.
0
 
LVL 7

Author Comment

by:BarryTice
ID: 2667147
Grant --
It sounds like that's what I'm looking for.

In the context of a DOS command line (if anybody remembers those), I'm looking for the parameters that would have followed the initial command.

If I were to launch my vb program from a DOS command line, passing extra parameters at the end, those parameters are what I want to capture.

If the Command() function will give them to me, that's exactly what I'm looking for.  Thanks! -- b.r.t.
0
 
LVL 32

Expert Comment

by:Brendt Hess
ID: 2667209
gcs has it - Command returns a string containing all command line parameters.  It's up to you to parse the string, but that's pretty easy, after all.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 7

Author Comment

by:BarryTice
ID: 2670813
Grant --
It worked exactly as you said it would. Thanks!

If you're in a hurry to collect points, I'll grade you on this at the current point level. If you're in no hurry, I'll wait until EE gets its point distribution working again, and take this up to 50. (By my count, I should have 49 today. But I only have 24, and they're all devoted to this question.)

Thanks again! -- b.r.t.
0
 
LVL 4

Expert Comment

by:gcs001
ID: 2670838
Glad it worked.
I'm willing to wait for the extra points.
Let me know when you have them available.

Regards,
Grant.
0
 
LVL 7

Author Comment

by:BarryTice
ID: 2673369
Adjusted points from 24 to 50
0
 
LVL 7

Author Comment

by:BarryTice
ID: 2673370
Here are some points and a nice grade for you, Grant. Thanks for the help! -- b.r.t.
0
 
LVL 4

Expert Comment

by:gcs001
ID: 2677150
Thanks Barry, glad I could help.
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

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…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

801 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