Results 1 to 7 of 7

Thread: texts or string input..

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2004
    Posts
    908

    texts or string input..

    appXL1.ActiveSheet.Cells(Number, 3).Value = txtQty.Text

    the above statement when i key in txtQty.Text as numbers....the spreadsheet could show the numbers however when i key in letters..error: application-defined or object dfined error....why?

  2. #2
    Addicted Member
    Join Date
    Aug 2002
    Location
    Luton, UK
    Posts
    178
    Input to text boxes always comes out as text.

    Perhaps you need to be more explicit and inlclude the form, something like:

    appXL1.ActiveSheet.Cells(Number, 3).Value = MyUserFormName.txtQty.Text

    Perhaps the error is somewhere else in your code. If the above doesn't work, post the whole code. Where are you running it from ?
    Regards
    BrianB
    -------------------------------

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2004
    Posts
    908
    hi..how do i post a zip file ?to that you can have a look?

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2004
    Posts
    908
    i have try the methods by puting frm. in front but still wont work..

  5. #5
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538
    Rather than uploading a zip file, try to post a smaller / cut down portion of your code relavant to the above question.

    In response to this one, try leaving out this .value part & seeing if this makes a difference first...

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  6. #6
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950
    Is that cell formatted to Numbers? Maybe there's a type mismatch if you use letters?

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2004
    Posts
    908
    i have solve the problem ...its actually yhe logical error..thanks to your reply..

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