Hi all,
I'm using Excel 2010/VBA to create a rather lengthy, involved macro with the purpose of transforming 500+ formatted, pdf reports into individual lines of data. I'm currently hunting down minor bugs with one or two reports that come out differently than they should.
Early on in the code, I run through a couple instances of TextToColumns. These have worked flawlessly for the past few weeks.
This morning, without changing any code related to the TextToColumns functions, one of the two usages started malfunctioning. The code is as follows:
The first text to columns works fine. The second text to columns offsets the data by 1 row, which throws off my everything--especially if it's going to be happening essentially at random.
It didn't do this earlier this morning, but now it's doing it consistently. The only code I changed was later on in the macro, and these are my only two instance of TextToColumns, so defaults shouldn't have changed.
I searched, and I can't find any other instances of someone experiencing this bug--so I've concluded it must be user error. Help! I don't even know what I could have done to cause this ...
-Matt
I'm using Excel 2010/VBA to create a rather lengthy, involved macro with the purpose of transforming 500+ formatted, pdf reports into individual lines of data. I'm currently hunting down minor bugs with one or two reports that come out differently than they should.
Early on in the code, I run through a couple instances of TextToColumns. These have worked flawlessly for the past few weeks.
This morning, without changing any code related to the TextToColumns functions, one of the two usages started malfunctioning. The code is as follows:
Code:
Selection.TextToColumns Destination:=Selection, DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:="{", FieldInfo:=Array(Array(1, 1), Array(2, 1)), TrailingMinusNumbers:=True
Selection.Offset(0, 4).Select
Selection.TextToColumns Destination:=Selection, DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=True, Other:=False, FieldInfo:=Array(Array(1, 1), Array(2, 1)), TrailingMinusNumbers:=True
It didn't do this earlier this morning, but now it's doing it consistently. The only code I changed was later on in the macro, and these are my only two instance of TextToColumns, so defaults shouldn't have changed.
I searched, and I can't find any other instances of someone experiencing this bug--so I've concluded it must be user error. Help! I don't even know what I could have done to cause this ...
-Matt