Results 1 to 10 of 10

Like Operator in Simple Macro

Threaded View

boldcode Like Operator in Simple Macro 04-22-2013, 08:12 PM
JapanDave Re: Like Operator in Simple... 04-22-2013, 08:32 PM
boldcode Re: Like Operator in Simple... 04-22-2013, 10:19 PM
MarvinP Re: Like Operator in Simple... 04-22-2013, 08:46 PM
boldcode Re: Like Operator in Simple... 04-22-2013, 10:20 PM
Leith Ross Re: Like Operator in Simple... 04-22-2013, 08:58 PM
boldcode Re: Like Operator in Simple... 04-22-2013, 10:19 PM
boldcode Re: Like Operator in Simple... 04-22-2013, 10:41 PM
jindon Re: Like Operator in Simple... 04-22-2013, 10:34 PM
boldcode Re: Like Operator in Simple... 04-22-2013, 10:39 PM
  1. #1
    Forum Contributor
    Join Date
    04-20-2011
    Location
    New York, New York
    MS-Off Ver
    Excel 2010
    Posts
    160

    Like Operator in Simple Macro

    Hi,

    I want to use the Like Operator within an IF Statement. I created some code below that if a user tries to name a new worksheet using the these characters

    :\/?*[]

    then my message custom error message will come up.

    Here is my code below:

    If strNewWSName Like.........Then 'this is where I want to add those specail characters
                    MsgBox Prompt:="Special Characters are not allowed as part of a worksheet name.", _
                    Buttons:=vbExclamation, Title:=""
                    GoTo ShowInputBoxEnterNewWSName
                End If
    Thank you,

    BC
    Last edited by boldcode; 04-22-2013 at 10:40 PM. Reason: Solved

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1