please post full code to see how you called the include
Main Topics
Browse All TopicsI have a .vbs file that was converted from a .asp file.
It's changed to a .vbs file so it can be run from the command line.
when I run it, I get the error:
Type mismatch: 'GenerateMagazineRequestTh
the function is actually in "RequestThread.asp", which I tried to include as a include file in the .vbs file
I'm not sure if the method I used to include it was done the right way or not.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
This is what I did in my .vbs file:
I put it at the very top so it will execute first.
GenerateMAGAZINERequ
This is the error I get now:
yFile.vbs(2, 192) Microsoft VBScript compilation error: Cannot use parentheses when calling a Sub
either use
GenerateMAGAZINERequest
or
call GenerateMAGAZINERequestThr
Neither one of those worked.
I think the problem is that, my function ( GenerateMAGAZINERequestThr
Did I include the file correctly that has it?
This is the method I use to include:
Dim FSO, ScriptFile
Set FSO = CreateObject("Scripting.Fi
Set ScriptFile = FSO.OpenTextFile("RequestT
GetFileContents = ScriptFile.ReadAll
Set ScriptFile = Nothing
Set FSO = Nothing
When I add this line to the above 'ExecuteGlobal GetFileContents' ,
I get this error:
Expected Statement 800A0400 compilation error
In either case, it does not work whether or not I add 'ExecuteGlobal GetFileContents'
This is starting to get frustrating now. I made some changes but I get the same error.
This is what I have for an include now:
Dim FSO, ScriptFile
Set FSO = CreateObject("Scripting.Fi
Set ScriptFile = FSO.OpenTextFile("RequestT
GetFileContents = ScriptFile.ReadAll
Set ScriptFile = Nothing
Set FSO = Nothing
I'm including a .vbs file in a .vbs file now and I still get the same error.
Type mismatch: 'GeneratePhasingRequestThr
I don't think my method of including a file is working.
Does anyone know another method?
Thanks.
I found the solution.
It's a "type mismatch" b/c it's not recognizing my function and that's b/c I'm not including the file correctly.
Here is the proper way to add a .vbs into another .vbs file.
Dim FSO, ScriptFile
Set FSO = CreateObject("Scripting.Fi
Set ScriptFile = FSO.OpenTextFile("RequestT
ExecuteGlobal ScriptFile.ReadAll
Set ScriptFile = Nothing
Set FSO = Nothing
once I made the change to the above, it worked.
Thanks guys.
Business Accounts
Answer for Membership
by: RobSampsonPosted on 2008-07-08 at 20:10:14ID: 21960307
Hi, you need a function in your VBS called estThread
erhaps in the ASP page, there's a Sub or Function called that......
GenerateMAGAZINERequ
P
Rob.