I have a string in VBA and it has a space in it how do i create some code (a function) where i pass a string in and it returns everything before the first space.
for example.
String1 = "the moon"
String2 = SOMEFUNCTION(String1)
String2 should equal "the"

Can anyone help me with this please.