ericdevy Report post Posted 08/14/2007 08:57 AM Hi, I am trying to incorporate a VBS script into voiceguide which currently runs in excel as an additional module. What happens in excel is that you enter the serial number and it generates a 4 digit code for you. I have taken the vbs part out of excel and would like voiceguide to run this script and generate the code instead of excel. Any help would sincerely be appreciated. I dont really know vb scripting at all. Regards, Eric (I have attached the current VBS script as a text file which is in excel as a module.). Share this post Link to post
SupportTeam Report post Posted 08/14/2007 10:25 AM Have you tried placing the script in a VBScript module and using the Run_ResultReturn function to return data back to VoiceGuide? Please see: http://www.voiceguide.com/vghelp/source/html/modvbs.htm If you can post your VBScript and your current VoiceGuide script here then we can assist in getting the VBScript module to a working state. Share this post Link to post
ericdevy Report post Posted 08/14/2007 12:11 PM Have you tried placing the script in a VBScript module and using the Run_ResultReturn function to return data back to VoiceGuide? Please see: http://www.voiceguide.com/vghelp/source/html/modvbs.htm If you can post your VBScript and your current VoiceGuide script here then we can assist in getting the VBScript module to a working state. When i try to post the vbs files i get an error. should i rename them to txt???? Share this post Link to post
ericdevy Report post Posted 08/14/2007 12:30 PM Please see attached my voiceguide script as well as the vbs script (renamed to vbsscript.txt). Best Regards, Eric Get_Code_Voiceguide.vgs vbsscript.txt Share this post Link to post
SupportTeam Report post Posted 08/14/2007 11:09 PM The attached version shows the approach to take. We did some modifications to the Visual Basic function provided to make it work as a VBScript but modifications are still not complete in the uploaded file. The Visual Basic function provided has to have it's "Next" statements modified and the "Val" functions removed to make the VBScript interpreter work. Maybe there are some other changes as well. To convert and test the entire function would take too long and is outside the scope of this free support forum. Please contact sales@voiceguide.com if you would like us to perform this work though. Get_Code_Voiceguide.vgs Share this post Link to post
ktruk Report post Posted 08/16/2007 07:59 PM I haven't looed at your code, but I just thought thaty I would mention that you can simulate a Val in vbs by adding a VBS function: function Val(x) if x = "" then Val = 0 else Val = clng(x) end if Change cLng to suit the data type, eg: cInt may be more suitable Share this post Link to post