Hello all.
I have been scouring the internet (including this site) for help with this but have been unsuccesful thus far.
I have 2 text files that I need opened in Excel using fixed width (they are not delimited), but, in all the separate pieces of code that I have found, you need to declare when each column starts. My problem is that the columns will almost always be of varying widths, e.g. the Part Number column will be a different length one month to the next, therefore 'throwing' out the array and all subsequent ones.
So my question is, is there any way to call the text file import wizard so the user can manually set the column widths and then, once Finished is pressed, have the code continue on it's merry way? I have tried recording a macro and going through the motions to see if there is a clue in the recorded code as to how to do this, but I cannot see one.
Many thanks all - this sounds so easy but I cannot find the solution.
Richard
I have been scouring the internet (including this site) for help with this but have been unsuccesful thus far.
I have 2 text files that I need opened in Excel using fixed width (they are not delimited), but, in all the separate pieces of code that I have found, you need to declare when each column starts. My problem is that the columns will almost always be of varying widths, e.g. the Part Number column will be a different length one month to the next, therefore 'throwing' out the array and all subsequent ones.
So my question is, is there any way to call the text file import wizard so the user can manually set the column widths and then, once Finished is pressed, have the code continue on it's merry way? I have tried recording a macro and going through the motions to see if there is a clue in the recorded code as to how to do this, but I cannot see one.
Many thanks all - this sounds so easy but I cannot find the solution.
Richard