I have a 30 line text file with all lines looking like this, some separated by empty lines. All have a 'return' (CR LF) at the end.
I have externally copied all the text to the clipboard. My VBA macro includes this code which display it in a temporary message box. (Well, most of it. Apparently there is a 1024 character limit.)Please Login or Register to view this content.
But I'm struggling with the next two stages and would appreciate some help please.Please Login or Register to view this content.
1. For each line, set a VBA variable containing the part after last equal sign. Ideally, but not essential, I'd like to use a variable name identical to the string after the first equal sign. So the first line would generate a string variable called 'tFileName' with value '20190706Cadgwith-Coverack-r1060-m7.3.gpx'.
2. In the single, already open workbook 'WalkIndex.xlsm', sheet 'Target', create a new row from these variables at the end of all previous rows. So tFilename would be entered into col C, tDatePrefix into col B, etc. When my source was in another workbook I was doing it with the following code (developed with much help here):
Please Login or Register to view this content.
I've attached an extract from WalkIndex.xlsm
Any assistance would be much appreciated please.
Bookmarks