user form, field split???

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a field that contains a set of numbers, and I would like to display
those numbers in a user form in different fields. These would not be
editable, nor do they need to be saved, this is just for display purposes
only.

The data in the field (cell) looks like this:
12345.001 12346.005
22223.006 53423.009 12345.001

There is always just one space between the numbers. There can be anywhere
from zero to 20 numbers in this cell.

Is this possible? If yes, can it be easily done?
 
With Me.Userform1
.Label1.Caption = Left$(Range("A1").Value, InStr(Range("A1").Value, "
") - 1)
.Label2.Caption = Right$(Range("A1").Value, Len(Range("A1").Value) -
InStr(Range("A1").Value, " "))
End With

Just add this code to wherever you want to introduce this data

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

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

Back
Top