Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old February 15th, 2006, 03:55 PM
Henry Stockbridge
Guest
 
Posts: n/a
Default fOSUserName for Multiple UserNames

Hi,

I am attempting to incorporate Dev Ashish's fOSUserName code with
multiple UserNames but come up with a runtime error (13) / Type
mismatch. Any help you can lend would be appreciated. Here is the
code:

'=================
Sub cmdNext_Click()

Dim strName As String
strName = fOSUserName

If strName Like "doejane" Or "doejohn" Or "hancockjohn" Then
' Run this code...
Else
' Run this code....
End If

End Sub
'=================

Henry

  #2  
Old February 15th, 2006, 05:15 PM
Tim Marshall
Guest
 
Posts: n/a
Default Re: fOSUserName for Multiple UserNames

Henry Stockbridge wrote:
[color=blue]
> Any help you can lend would be appreciated. Here is the[/color]

Try:

If strName Like "doejane" Or strName Like "doejohn" Or strName Like
"hancockjohn" Then

I personally would use = instead of the like operator here if you don't
specify any wildcards.

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles