View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Moving a Variant to Array

Oops.

Thanks for the correction.

Ivan wrote:

Dave, thanks. Only a comment, because I need to change following sentence:
spacepos = instr(1, mystr, " ", 1)
With this change my sentence is working ok.
Best regards,
Iván

"Dave Peterson" wrote:

dim myStr as string
dim SpacePos as long
myStr = "123c namenamenamename"

spacepos = instr(1,mystr&" "," ")

msgbox left(mystr,spacepos-1)

might be a way to go about it.


Ivan wrote:

I have a ComboBox with a following data (code and name):
12345acb namenamenamenam
123c namenamenamename

and then I need to move only first data (code) to a variant in order to use
in Vlookup. Is an option to move each characters and ending when find the
first blank...? How I can make this?
Thanks for your help.
Ivan


--

Dave Peterson


--

Dave Peterson