Extract text out of textbox

B

billybanter67

I have a text box which has peoples address details in it, included in
this one text box is the persons name, address incl post code and
suburb. The reason this is in one text box is that I sell some items
on ebay and I just copy the buyer details and use this code listed
below to paste it into a text box field, from there I copy and paste
it in to each individual field.

Private Sub BillingAddress_DblClick(Cancel As Integer)

On Error GoTo Err_BillingAddress_DblClick
Me.BillingAddress.SetFocus
RunCommand acCmdPaste
EmptyClipboard
Exit_BillingAddress_DblClick:
Exit Sub

Err_BillingAddress_DblClick:
'MsgBox Err.Description
Resume Exit_BillingAddress_DblClick
End Sub

What I want to do is to extract say the person first name and then the
post code.

RICHARD HEWSON
12 SMITH STREET
BURWOOD EAST VIC 3151

So what I want here is to extract the "RICHARD" to a textbox called
firstname and the "3151" to a textbox postcode.


Any ideas?

thanks
 
B

billybanter67

works perfect, thanks for your effort.

Now if I wanted to extract the "BURWOOD EAST " what would I do?
Thanks
 
B

billybanter67

Hi again,

Thanks, now I have placed this function in a module.

Could you pls explain the use of this.

Regards
Richard
 

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