Tommy Random
New Member
- Joined
- Dec 12, 2009
- Messages
- 22
User copies and pastes data (as text) to the next unused row on a worksheet. Data/Text-to-Column works fine. Later the user updates the worksheet in the same manner, and the new data occupies a new location further on down in the worksheet.
As part of a longer macro, I wish to include the code to convert text to columns at the location of the active cell, where the new data has just been pasted. The code I get when I use the macro recorder includes the destination for the active cell at the point the macro was recorded. (If the user invokes the recorded macro, useful data would be overwritten.) So, how do I work it so the text-to-column conversion is applied at the location of the current active cell?
Here is the relevant portion of the recorded macro code, problem element in Bold:
Selection.TextToColumns Destination:=Range("A10219"), DataType:= _
I am thankful for any help.
As part of a longer macro, I wish to include the code to convert text to columns at the location of the active cell, where the new data has just been pasted. The code I get when I use the macro recorder includes the destination for the active cell at the point the macro was recorded. (If the user invokes the recorded macro, useful data would be overwritten.) So, how do I work it so the text-to-column conversion is applied at the location of the current active cell?
Here is the relevant portion of the recorded macro code, problem element in Bold:
Selection.TextToColumns Destination:=Range("A10219"), DataType:= _
I am thankful for any help.