+ Reply to Thread
Results 1 to 4 of 4

VB Error in CLng

  1. #1
    Forum Contributor
    Join Date
    01-14-2004
    Location
    India
    MS-Off Ver
    365
    Posts
    264

    VB Error in CLng

    Hi
    I am sorry, that I couldn't put a proper Title for the blog.
    Please find the attached file.
    The objective is to generate a list from the Sheet (Database) where the Balance (Cell P) is less than zero. The VB is working perfect, but there is a small bug which I couldn't solve it. Let me explain the problem.

    The Problem is with Field "Telephone" - (CELL - I)
    I am having error in the following conditions.

    If Field "Telephone" (CELL I) in the 1st record of the database is BLANK or if it is a TEXT then I am getting an error.

    If any other record is having a text (NOT NUMERICAL) in that field also getting the same error

    It will work even if it is BLANK in all record except the 1st record.

    My data is having Alpha/numeric in Telephone field.
    Hope someone can help me.
    Thanks
    Toms
    Attached Files Attached Files
    Last edited by SMILE; 10-26-2011 at 03:48 AM.
    Appreciate clicking the * Add Reputation button on your left side, if you want say thanks to me

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: VB Error in CLng

    hi, SMILE, please check attachment, run code "test"
    Attached Files Attached Files
    Last edited by watersev; 10-26-2011 at 03:36 AM.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    49,035

    Re: VB Error in CLng

    Change this:

    Please Login or Register  to view this content.

    to this:

    Please Login or Register  to view this content.

    And this:

    Please Login or Register  to view this content.

    to this:

    Please Login or Register  to view this content.

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Contributor
    Join Date
    01-14-2004
    Location
    India
    MS-Off Ver
    365
    Posts
    264

    Re: VB Error in CLng

    Thank you guys!!!
    Perfect solution...

+ Reply to Thread

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