+ Reply to Thread
Results 1 to 5 of 5

Current Code not working

  1. #1
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Current Code not working

    Have to code but getting problem if more then one character is in C13. Works perfect if only one character is typed in cell,how can I change
    it so if more then one invalid character is in cell? Thanks for any suggestions. Z
    For example this get error 45 elm. 4/23/2015
    Please Login or Register  to view this content.

    This is the code on userform yes button

    Please Login or Register  to view this content.
    Last edited by zplugger; 04-09-2015 at 10:04 AM.

  2. #2
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: Current Code not working

    There is no need to check with InStr. Just loop trough invalid chars and use the replace. If the char is not found nothing will happen.

    Please Login or Register  to view this content.
    If you are pleased with a member's answer then use the Star icon to rate it.

  3. #3
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Current Code not working

    Thanks buran
    Getting error still? This only happens if more then one character is inputed.
    Form already displayed;can't show modally

  4. #4
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: Current Code not working

    Oh, I misunderstood your problem. Sorry

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Current Code not working

    Thanks buran, seems to be working now.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Set PivotTable Filter to Current Day, Current Week, Current Month, or Current Year
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-30-2014, 08:31 AM
  2. [SOLVED] VBA code to save current worksheet as temporary PDF file and then add to my existing code
    By brianfromla in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-20-2014, 08:35 AM
  3. [SOLVED] Need vba code for my current working formula
    By devawad in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-08-2014, 12:32 AM
  4. Code to insert current date (but NOT current time)
    By mjwillyone in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-13-2013, 09:37 AM
  5. [SOLVED] add current time (hh:mm:ss) as well as current date (dd:mm:yyyy) into the code
    By papasideris in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-28-2012, 02:29 PM

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