Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / September 2007

Tip: Looking for answers? Try searching our database.

StrComp numeric

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rick - 20 Sep 2007 19:32 GMT
When using this VB function :
If StrComp(Target.Offset(0, -3).Text, "Debit", vbTextCompare) = 0 Then

How do I turn it into a numeric test?
Tom Ogilvy - 20 Sep 2007 20:16 GMT
If you want to compare two numbers

If target.Offset(0,-3).Value > 21 then

If you mean case sensitive
replace vbTextCompare with
vbBinaryCompare

Natrually strcomp is for comparing strings.

Signature

Regards,
Tom Ogilvy

> When using this VB function :
> If StrComp(Target.Offset(0, -3).Text, "Debit", vbTextCompare) = 0 Then
>
> How do I turn it into a numeric test?
Rick - 20 Sep 2007 20:22 GMT
Thanks Tom: I was thinking in the same direction, but did not realize .value
> 0 would work.

> If you want to compare two numbers
>
[quoted text clipped - 10 lines]
> >
> > How do I turn it into a numeric test?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.