Results 1 to 2 of 2

Thread: Incrementing Cell Values

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    4

    Question

    Hi All,

    I've been trying to increment the value of cells in an OLE Excel spreadsheet. However I seem to run into trouble with my code since it seems to me that, if I assign a variable to a cell's value it is taken as a string. ie:

    Stat = MySheet.Cells(Col, Row).Value

    This will result in Stat containing a string value when I need it as an integer in order to increment the value. I had hoped I could explicity cast Stat as an int, but I had no luck there either.

    Can anyone please help?

    Thanks,

    Chris S.

  2. #2
    Hyperactive Member
    Join Date
    Nov 2000
    Location
    Mexico City
    Posts
    306

    Thumbs down

    When Im getting data from excel, I always have the same trouble. It always returns a string. All you can do is convert it to an integer with a simple val() or CInt()

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