CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: str -> Long

  1. #1
    Join Date
    Feb 2001
    Location
    New Jersey
    Posts
    312

    str -> Long

    dim x as long
    dim str as string

    str = "567"
    x = str


    This doesnt work. But how do I convert a string to a long?
    http://www.dewgames.com
    Shareware and Free games!

  2. #2
    Join Date
    Jul 2003
    Location
    Florida
    Posts
    651
    dim x as long
    dim str as string

    str = "567"
    x = CLng(str)

    You can also do CBool, CStr, CInt, etc...

    Fiona
    I'd rather be wakeboarding...

  3. #3
    Join Date
    Oct 2003
    Location
    .NET2.0 / VS2005 Developer
    Posts
    7,104
    cool.. so we got a forum member called DebbieInFlorida, and now i see another, is called Fiona and is in FLorida.

    maybe i should rename to MattInUK
    "it's a fax from your dog, Mr Dansworth. It looks like your cat" - Gary Larson...DW1: Data Walkthroughs 1.1...DW2: Data Walkthroughs 2.0...DDS: The DataSet Designer Surface...ANO: ADO.NET2 Orientation...DAN: Deeper ADO.NET...DNU...PQ

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

Featured