brianb probably 2 basic for here

J

joe

Brian here is my code


Sub Macro3()
'
' Macro3 Macro
' Macro recorded 7/23/2003 by Application Development
'

'
Range("A4").Select
ActiveSheet.PasteSpecial Format:="Unicode Text", Link:=False, _
DisplayAsIcon:=False
Cells.Select
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess,
_
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Selection.ColumnWidth = 19.14
Selection.ColumnWidth = 10.29
Selection.ColumnWidth = 18
Columns("B:B").Select
Selection.Delete Shift:=xlToLeft
Columns("D:D").Select
Selection.Delete Shift:=xlToLeft
Columns("E:E").Select
Selection.Delete Shift:=xlToLeft
End Sub


I am trying to copy data from an email to an excel spread sheet using vb. I
have not been successful either way so I tried to copy from the clipboart to
excel spread sheet just to get ideas and use the macro. When I create the
macro (using the record macro function), the data gets copied and then I use
the text wizard to format the data (it is seperated by spaces). This works
well. When I got to just run the macro, it stops and the data is still in
the raw format. How do I populate the row/cells like it did in the text
wizard? Any help (or code) would be appreciated. Thanks
Joe
 
D

Dan E

Selection.TextToColumns DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, _
Space:=True
Throw this in after the Selection.Sort and before Selection.ColumnWidth

Dan E
 

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