troubleshooting Question

String manipulation problems in VB6

Avatar of tazrebel
tazrebel asked on
ProgrammingVisual Basic Classic
6 Comments1 Solution669 ViewsLast Modified:
I have some constatn strings defined in a module, for example:
Public Const B707_FMC_Debug_Config_Spec As String = "fmc_debug_config_spec.txt"
In the main part of my code i dont want to have to repeat code for every new name so i am trying to pass in the current name and concatenate it to the rest of the string. So for example, i insted of using B707_FMC_Debug_Config_Spec to retrieve the string i need. I need to pass in the main name and then build the string so retrieve the constant string. The code looks like this:

curPrgmConfigSpec = selectedProgram & "_DSIL_Config_Spec"

Im passing in selectedProgram, wich in this case is B707. But instead of "curPrgmConfigSpec"containing    
           fmc_debug_config_spec.txt
which is what it should resolve to;
it contains  
     B707_DSIL_Config_Spec
How can i get it to resolve to the constant i have declared in the module and not be seen as just a simple stirng? Your help is greatly appreaciated.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros