Results 1 to 5 of 5

Thread: [RESOLVED] cell has comma

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2007
    Posts
    241

    Resolved [RESOLVED] cell has comma

    hi!
    when i compare the celle with screen
    the screen has with comma
    for example 2,294
    but the cell looks like 2,294 but it shows 2294
    how to have with comma when i compare with screen.

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: cell has comma

    compare with the cells text property instead of value
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jun 2007
    Posts
    241

    Re: cell has comma

    I DID but it gives error unable to set of the text property in range class
    Cells(x, MyCl).Text = Mytotal1

  4. #4
    Member
    Join Date
    Nov 2009
    Posts
    35

    Re: cell has comma

    .Text is Read Only. Use it to get the actual text in the cell.
    2,294 is just cell formating with the comma being the thousend separator. The actual value is 2294. You may set the Value but not the Text.

    -Terry

  5. #5
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: cell has comma

    Set the cell Value and Format
    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

Posting Permissions

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



Click Here to Expand Forum to Full Width