Results 1 to 4 of 4

Error using Clng function in vba to convert string to long data type

Threaded View

welchs101 Error using Clng function in... 06-04-2011, 10:50 PM
MarvinP Re: Error using Clng function... 06-04-2011, 10:57 PM
mikerickson Re: Error using Clng function... 06-04-2011, 11:17 PM
welchs101 Re: Error using Clng function... 06-05-2011, 06:12 AM
  1. #1
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    Error using Clng function in vba to convert string to long data type

    I have this string for example

    dim junk1 as string
    dim junk2 as long
    
    
    junk1 = ""
    junk2=clng(junk1)
    when i run this i get a run time error for type mismatch

    any ideas? is it because the string is empty?
    Last edited by welchs101; 06-05-2011 at 06:13 AM.

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