![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Outlook 2003 SP3
Hi, I'm trying to find * and ? in the string. Do I have to do two separate if statements, or can I use some kind of OR statement? This isn't working: If Instr(1, Item.UserProperties("JobName"), "*" or "?", vbTextCompare) 0 Then MsgBox "Sorry, you cannot use the * or ? character" Exit Sub end if Thanks, Joel |
Ads |
#2
|
|||
|
|||
![]()
Joel Allen wrote:
Outlook 2003 SP3 Hi, I'm trying to find * and ? in the string. Do I have to do two separate if statements, or can I use some kind of OR statement? This isn't working: If Instr(1, Item.UserProperties("JobName"), "*" or "?", vbTextCompare) 0 Then MsgBox "Sorry, you cannot use the * or ? character" Exit Sub end if Thanks, Joel x = "Joe Blow" ? (ubound(split(x,"*")) or ubound(split(x,"?"))) 0 'False x = "Joe*Blow" ? (ubound(split(x,"*")) or ubound(split(x,"?"))) 0 'True x = "Joe Blow?" ? (ubound(split(x,"*")) or ubound(split(x,"?"))) 0 'True x = "Joe*Blow?" ? (ubound(split(x,"*")) or ubound(split(x,"?"))) 0 'True Or you could use Instr() but 2 separate comparisons as well. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
TAB Key Function Changed | mcp6453[_2_] | Outlook Express | 1 | April 5th 08 08:25 PM |
Outlook Function help | JC | Outlook and VBA | 3 | January 29th 08 06:57 AM |
NO REPLY FUNCTION | Adele Clingman | Outlook - General Queries | 2 | November 8th 07 11:32 PM |
Weekday function | DENNIS BROWN | Outlook and VBA | 3 | July 26th 07 03:01 PM |
Search the Web Function | GMS | Outlook Express | 1 | February 2nd 07 08:23 PM |