Creating a macro to use the text import wizard

A

abxy

In an effort to save time, I need to create a macro that will "past
special" my already copied text, and then use the text import wizard t
break the text into columns. I've tried to create this macro before bu
it only paste special my text. it never performs the operations wit
the text import wizard.

for the data I work with I always have to paste special (I can't impor
the data directly from the text file, I have to manually go in and cop
it) then use the text import wizard to break the data up into th
columns(the columns are always the same).

Thanks in advanc
 
D

Dan E

Abxy,

Use
Range(Your_Range).TextToColumns

Look under help in VBA, there are a lot of options which can be
specified when using this function.

Dan E
 
A

abxy

Ok, Major thanks. this has gotten me off on the right foot, however,
I'll be the first to tell you, I don't know a thing about the process
of getting a macro written out in VB to naming it and using it as a
"ctrl+" hot key in my workbook.

As I said before I'm trying to create a macro to paste my text, which
is already on the clipboard, and use text import wizard, or perform
it's function at least, which is, in this case, breaking up my pasted
text into columns. This is as far as I've gotten:

Worksheets("Sheet1").Activate
ActiveSheet.Paste


I looked into the "texttocolumns" command in VB, and it's exactly what
I need. I know it's exactly what I need because i read the description
of what it does. The problem is, I don't know the first thing about how
to go about using it and making a macro out of it. So i'm here asking
for help on how to create this macro i need, from start to finish. If
it'll help you all any the image below is how my text needs separated
into columns. How do I this?

Attachment filename: example.jpg
Download attachment: http://www.excelforum.com/attachment.php?postid=403657
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top