Reply from Martin Walke on Mar 21 at 5:14 AM Having followed this thread from the beginning, there's two other ways of handling the input. 1. Same as your's, Rob, but put all your code into a sub main() so you don't have to worry about the form at all so remove it; 2. Use VBS and then you don't have to worry about having VB6 installed at all Martin
| | | ---------------Original Message--------------- From: Rob Crombie Sent: Wednesday, March 21, 2012 12:39 AM Subject: VB script/Batch File to Convert Tab Delimited to XLS Format PS I have had time to sleep on it. Get rid of the Timer and it's event. And use this Form_Load (I added 3 extra lines on the end) - Private Sub Form_Load() Dim sCmdLine As String Dim myArr() As String sCmdLine = Trim(Command) If sCmdLine <> "" Then myArr = Split(sCmdLine, ",") PathFileIN = Trim(myArr(0)) PathFileOUT = Trim(myArr(1)) End If If PathFileIN = "" Then 'Rob must be testing and not passing Command string PathFileIN = App.Path & ".\Tab_Delim_File.txt" PathFileIN = Replace(PathFileIN, "\\", "\") End If If PathFileOUT = "" Then 'Rob must be testing and not passing Command string PathFileOUT = App.Path & ".\vbtest.xls" 'create spreadsheet in the current directory PathFileOUT = Replace(PathFileOUT, "\\", "\") End If Call cmdCreate_Click DoEvents Unload Me End Sub | | Reply to this email to post your response. __.____._ | _.____.__ |
No comments:
Post a Comment