+ Reply to Thread
Results 1 to 15 of 15

"Typt mismatch" msg

  1. #1
    Forum Contributor
    Join Date
    09-01-2011
    Location
    England
    MS-Off Ver
    Excel 365
    Posts
    126

    "Typt mismatch" msg

    Hi All,

    When I run that code, i have got a msg "type mismatch", I tried to solve it but i cant

    please HELP..

    Please Login or Register  to view this content.
    The error here, in that line
    Please Login or Register  to view this content.
    Last edited by Mamud; 09-19-2011 at 06:23 AM.

  2. #2
    Valued Forum Contributor mohd9876's Avatar
    Join Date
    05-04-2011
    Location
    Amman, Jordan
    MS-Off Ver
    Excel 2010
    Posts
    426

    Re: "Typt mismatch" msg

    in what line does the error appear?
    could you post a workbook?

  3. #3
    Forum Contributor
    Join Date
    09-01-2011
    Location
    England
    MS-Off Ver
    Excel 365
    Posts
    126

    Re: "Typt mismatch" msg

    sorry mohd9876, i forget that issue

    i edited it in the original post

  4. #4
    Valued Forum Contributor mohd9876's Avatar
    Join Date
    05-04-2011
    Location
    Amman, Jordan
    MS-Off Ver
    Excel 2010
    Posts
    426

    Re: "Typt mismatch" msg

    you can't change the value for range with multiple cells, instead you can do the following
    Please Login or Register  to view this content.

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: "Typt mismatch" msg

    What's the poin t in using : to join lines like that, it just makes reading the code more difficult.

    Also, why set a range to what is almost the whole column, just limit it too the cells used in the column.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  6. #6
    Forum Contributor
    Join Date
    09-01-2011
    Location
    England
    MS-Off Ver
    Excel 365
    Posts
    126

    Re: "Typt mismatch" msg

    thx mohd9876

    it works, but the excel file when running, hang

  7. #7
    Valued Forum Contributor mohd9876's Avatar
    Join Date
    05-04-2011
    Location
    Amman, Jordan
    MS-Off Ver
    Excel 2010
    Posts
    426

    Re: "Typt mismatch" msg

    That's because of what RoyUK just said.. you are applying the code to the whole column while you can just limit it to the cells in use like this:
    Please Login or Register  to view this content.

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: "Typt mismatch" msg

    Quote Originally Posted by mohd9876 View Post
    That's because of what RoyUK just said.. you are applying the code to the whole column while you can just limit it to the cells in use like this:
    Please Login or Register  to view this content.
    Well at least someone reads all the posts.

  9. #9
    Forum Contributor
    Join Date
    09-01-2011
    Location
    England
    MS-Off Ver
    Excel 365
    Posts
    126

    Re: "Typt mismatch" msg

    sorry for delay

    I have changed the code to

    Please Login or Register  to view this content.
    but now, i still have the same error "Type mismatch"
    when i select the second option "Swab Test", in that part of code
    Please Login or Register  to view this content.
    Last edited by Mamud; 09-18-2011 at 11:41 PM.

  10. #10
    Valued Forum Contributor mohd9876's Avatar
    Join Date
    05-04-2011
    Location
    Amman, Jordan
    MS-Off Ver
    Excel 2010
    Posts
    426

    Re: "Typt mismatch" msg

    well now the type miss match is due to another issue which is because your adding a (most probably) string to a number
    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    09-01-2011
    Location
    England
    MS-Off Ver
    Excel 365
    Posts
    126

    Re: "Typt mismatch" msg

    it's important to run that line
    Please Login or Register  to view this content.

  12. #12
    Valued Forum Contributor mohd9876's Avatar
    Join Date
    05-04-2011
    Location
    Amman, Jordan
    MS-Off Ver
    Excel 2010
    Posts
    426

    Re: "Typt mismatch" msg

    what are your trying to accomplish with this line?
    what good could it make adding 0 to anything,, if you want to add a 0 to the beginning of a string try this
    Please Login or Register  to view this content.

  13. #13
    Forum Contributor
    Join Date
    09-01-2011
    Location
    England
    MS-Off Ver
    Excel 365
    Posts
    126

    Re: "Typt mismatch" msg

    this zero aims to trun the range (SMax) from text to value

    I tried to try ur last code but the numbers in range (SMax) appear with 0

  14. #14
    Valued Forum Contributor mohd9876's Avatar
    Join Date
    05-04-2011
    Location
    Amman, Jordan
    MS-Off Ver
    Excel 2010
    Posts
    426

    Re: "Typt mismatch" msg

    why not use
    Please Login or Register  to view this content.

  15. #15
    Forum Contributor
    Join Date
    09-01-2011
    Location
    England
    MS-Off Ver
    Excel 365
    Posts
    126

    Re: "Typt mismatch" msg

    Wow........ thx thx thx

    it works

+ 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