i'm writing a macro from within excel 2003. if i have a string with value
"abc", how do i select just "ab".
i tried the left(string,number) function (which i use in VB all the time)
but i guess within excel that doesnt' work?
thanks.
i'm writing a macro from within excel 2003. if i have a string with value
"abc", how do i select just "ab".
i tried the left(string,number) function (which i use in VB all the time)
but i guess within excel that doesnt' work?
thanks.
Hi Mark
umm, left should work .. check out the following
Sub teststring()
mystr = "abc"
MsgBox Left(mystr, 2)
End Sub
if you can't get it to work, post your code and we'll have a look.
--
Cheers
JulieD
check out www.hcts.net.au/tipsandtricks.htm
....well i'm working on it anyway
"Mark" <[email protected]> wrote in message
news:%[email protected]...
> i'm writing a macro from within excel 2003. if i have a string with value
> "abc", how do i select just "ab".
>
> i tried the left(string,number) function (which i use in VB all the time)
> but i guess within excel that doesnt' work?
>
> thanks.
>
>
you're correct..it does work.. i'm brain dead this morning..
sorry for wasting your time. (my error was related to something else)
thx.
"JulieD" <[email protected]> wrote in message
news:[email protected]...
> Hi Mark
>
> umm, left should work .. check out the following
>
>
> Sub teststring()
> mystr = "abc"
> MsgBox Left(mystr, 2)
> End Sub
>
> if you can't get it to work, post your code and we'll have a look.
>
> --
> Cheers
> JulieD
> check out www.hcts.net.au/tipsandtricks.htm
> ...well i'm working on it anyway
> "Mark" <[email protected]> wrote in message
> news:%[email protected]...
> > i'm writing a macro from within excel 2003. if i have a string with
value
> > "abc", how do i select just "ab".
> >
> > i tried the left(string,number) function (which i use in VB all the
time)
> > but i guess within excel that doesnt' work?
> >
> > thanks.
> >
> >
>
>
As JulieD said, it works in VBA. However, this is often the command you
will get an error on if you have bad references in Tools=>References. Look
there after the error and see if you have one or more references marked as
MISSING. If you do, you need to fix these references.
References shown in Tools=>References in the VBE are relative to the Active
Project. Make sure (look in the project explorer window) that your workbook
is the Active Project (selected in the project explorer window).
--
Regards,
Tom Ogilvy
"Mark" <[email protected]> wrote in message
news:%[email protected]...
> i'm writing a macro from within excel 2003. if i have a string with value
> "abc", how do i select just "ab".
>
> i tried the left(string,number) function (which i use in VB all the time)
> but i guess within excel that doesnt' work?
>
> thanks.
>
>
no probs .. all have days like that
--
Cheers
JulieD
"Mark" <[email protected]> wrote in message
news:%[email protected]...
> you're correct..it does work.. i'm brain dead this morning..
> sorry for wasting your time. (my error was related to something else)
> thx.
>
>
> "JulieD" <[email protected]> wrote in message
> news:[email protected]...
>> Hi Mark
>>
>> umm, left should work .. check out the following
>>
>>
>> Sub teststring()
>> mystr = "abc"
>> MsgBox Left(mystr, 2)
>> End Sub
>>
>> if you can't get it to work, post your code and we'll have a look.
>>
>> --
>> Cheers
>> JulieD
>> check out www.hcts.net.au/tipsandtricks.htm
>> ...well i'm working on it anyway
>> "Mark" <[email protected]> wrote in message
>> news:%[email protected]...
>> > i'm writing a macro from within excel 2003. if i have a string with
> value
>> > "abc", how do i select just "ab".
>> >
>> > i tried the left(string,number) function (which i use in VB all the
> time)
>> > but i guess within excel that doesnt' work?
>> >
>> > thanks.
>> >
>> >
>>
>>
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks