+ Reply to Thread
Results 1 to 2 of 2

Disallow "/" character from being entered

  1. #1
    Registered User
    Join Date
    04-02-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    96

    Disallow "/" character from being entered

    Hey guys,

    I wonder if anyone could help me.

    I am looking to stop a user typing the "/" character into cell C17 on my spreadsheet, as when a macro is run, it uses this cell to name the file when saving, and windows doesn't allow this character in a file name, hence the macro crashes.

    Can anyone help me please?

    Thanks

    Jamer

  2. #2
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: Disallow "/" character from being entered

    Hi Jamer,

    You could set up a custom data validation rule in the cell like this:
    =ISERROR(SEARCH("/",$C$17))

    Btw, you could check the cell does not contain "/" in your VBA code by using the InStr() function.
    Hope that helps,

    Colin

    RAD Excel Blog

+ Reply to Thread

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