Hi all,
How i can split a string that include spaces by "&" ?
I already used split function but there are problem with spaces.

thanks.

I use instr() , mid() , right() , and left()

Hi,
this part of code :

Arr1 = Split("aaa bbb&ccc ddd&eee",4)

it returns the values aaa ccc eee
ignored the values after the spaces.

Best Regards,
Thank You

See if this help :

Arr1 = Split("aaa bbb&ccc ddd&eee","&")
commented: Thanks +4

Sorry, didn't remember there was a split command. Ignore my post

Why are you using the 4 in second parameter?
Did you mistype it?

Try simply

Arrl = Split("aaa bbb&ccc ddd&eee", "&")

It works fine for me.

And Msgbox Split("aaa bbb&ccc ddd&eee","&")(0) return "aaa bbb".

Regards,
Sidnei

Hi,
this part of code :

Arr1 = Split("aaa bbb&ccc ddd&eee",4)

it returns the values aaa ccc eee
ignored the values after the spaces.

Best Regards,
Thank You

commented: Thanks dude, its working. +4