Hello,
I have written a VB program (VB 6.0) that is basically a GUI for the user to select from various buttons to run other executable files (which I wrote in Perl). When the Perl executable is complete it writes the results to MS Excel. So back to the VB GUI, I have a second form (Form2) where the user can go and select one of the excel reports and open it to view.
I’ve written the code in VB so that when the user initially clicks the button to run the Perl executable, the location of the excel report will be put in the text box in Form 2.
Here’s my problem, after the button is selected to run the Perl executable, the VB GUI (which is Form 1) is closed (unloaded) and when the Perl executable is complete, it reopens the VB GUI. So I need a way to save the text of the location of the excel report that was placed in the text box in Form 2 and be there whenever the GUI is reopened.
Here is a snippet of my code in Form1:
As i was researching this, i kept reading about using a database, but i don't think that applies here...not sure.
I hope this is clear. Please let me know if I can give any more information.
Thanks,
Terra
I have written a VB program (VB 6.0) that is basically a GUI for the user to select from various buttons to run other executable files (which I wrote in Perl). When the Perl executable is complete it writes the results to MS Excel. So back to the VB GUI, I have a second form (Form2) where the user can go and select one of the excel reports and open it to view.
I’ve written the code in VB so that when the user initially clicks the button to run the Perl executable, the location of the excel report will be put in the text box in Form 2.
Here’s my problem, after the button is selected to run the Perl executable, the VB GUI (which is Form 1) is closed (unloaded) and when the Perl executable is complete, it reopens the VB GUI. So I need a way to save the text of the location of the excel report that was placed in the text box in Form 2 and be there whenever the GUI is reopened.
Here is a snippet of my code in Form1:
Code:
Private Sub Command2_Click()
Form2.Text1.Text = "C:\Results\Report-NBC1.xls"
‘Is there a line of code here that would save Form2 before the GUI is closed in the next line?
Unload Form1
Shell ("C: \NBC1.exe") ‘This is the Perl executable that will reopen the VB GUI when complete
End Sub
I hope this is clear. Please let me know if I can give any more information.
Thanks,
Terra
Comment