Selection.TextToColumns Destination:=Range("A3"),
would become
Selection.TextToColumns Destination:=ActiveCell,
I suspect.
--
Regards,
Tom Ogilvy
"Moo" wrote:
> Tom,
>
> Thanks for your response. I've just tried that and it mainly works.
> However, how do I get the pasting to go into the cells I've
> highlighted (current cell), rather than cell A3, which is what I
> recorded the original macro from (see code below):
>
> ActiveSheet.Paste
> Selection.TextToColumns Destination:=Range("A3"),
> DataType:=xlFixedWidth, _
> FieldInfo:=Array(Array(0, 1), Array(8, 1), Array(14, 1),
> Array(21, 1), Array(26, 1), _
> Array(53, 9), Array(55, 1)), TrailingMinusNumbers:=True
> End Sub
>
> I also keep getting the following message when running the macro, even
> though the cells I'm pasting into are blank and I have turned off the
> option to prompt when overwriting text! "Do you want to replace the
> contents of the destination cells?"
>
> Thanks.
>
>
|