I am using Extra V6.7 and need to populate a string variable within an Extra Macro with some text that is unable to be read directly by the Extra Macro. I have written a VB6 .EXE programme that will read the required text from the remote location when supplied with the three input variables. The problem is that I cant suss out how to get the required text back into the extra macro.
The dirty work around that I am using at the moment is for the VB6 programme to read the text then save it to a text file on the local PC, the Extra Macro then reads this text file after the VB6 programme has run and loads it into the required string variable.
There must be a way to do this but it is not something that I have done before. I'm fine with dooing it the other way around... driving Extra from Word, Excel, Access or VB but in this case I need the Extra Macro to do the driving and get the answer.
Dim ToBeSent As String
Dim MyShell As Single
'I need to pass three strings the the .EXE programme.
ToBeSent = "MySrtVar1,MyStrVar2,MyStrVar3"
'Add the location of the programme.
ToBeSent = "C:\MyProggy.exe " + ToBeSent + ","
MyShell = Shell(ToBeSent,1)
Msgbox MyShell 'This will now contain a number.
'Then later I read the .txt file and load the text into a variable for processing.
Open "C:\MyTextFile.txt" For Input As #FileNumber
Anyone got any pointers.
The dirty work around that I am using at the moment is for the VB6 programme to read the text then save it to a text file on the local PC, the Extra Macro then reads this text file after the VB6 programme has run and loads it into the required string variable.
There must be a way to do this but it is not something that I have done before. I'm fine with dooing it the other way around... driving Extra from Word, Excel, Access or VB but in this case I need the Extra Macro to do the driving and get the answer.
Dim ToBeSent As String
Dim MyShell As Single
'I need to pass three strings the the .EXE programme.
ToBeSent = "MySrtVar1,MyStrVar2,MyStrVar3"
'Add the location of the programme.
ToBeSent = "C:\MyProggy.exe " + ToBeSent + ","
MyShell = Shell(ToBeSent,1)
Msgbox MyShell 'This will now contain a number.
'Then later I read the .txt file and load the text into a variable for processing.
Open "C:\MyTextFile.txt" For Input As #FileNumber
Anyone got any pointers.