+ Reply to Thread
Results 1 to 6 of 6

Convert string to value in UserForm text box

  1. #1
    Forum Contributor
    Join Date
    06-11-2009
    Location
    Cape Town
    MS-Off Ver
    Microsoft 365
    Posts
    818

    Convert string to value in UserForm text box

    I'm getting an error with 2nd last line of code (dCurrentAssets = CDbl(sCurrentAssets))? Have been struggling for a few hours so getting desperate...

    Please Login or Register  to view this content.
    Thanks in advance

  2. #2
    Forum Guru mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,203

    Re: Convert string to value in UserForm text box

    When it errors, what is the value of sCurrentAssets?
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Forum Contributor
    Join Date
    06-11-2009
    Location
    Cape Town
    MS-Off Ver
    Microsoft 365
    Posts
    818

    Re: Convert string to value in UserForm text box

    sCurrentAssets = ""

  4. #4
    Forum Guru mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,203

    Re: Convert string to value in UserForm text box

    Try changing that line to

    Please Login or Register  to view this content.
    or possibly

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    06-11-2009
    Location
    Cape Town
    MS-Off Ver
    Microsoft 365
    Posts
    818

    Re: Convert string to value in UserForm text box

    Thanks for your reply - much appreciated! I changed to "AfterUpdate" & it works. I will try your suggestion & revert once tested.

  6. #6
    Forum Contributor
    Join Date
    10-23-2012
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2003
    Posts
    175

    Re: Convert string to value in UserForm text box

    Probably because sCurrentAssets is null?

    Sorry didn't see the above.
    Last edited by Croweater; 05-26-2020 at 10:01 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Convert text string into date
    By maacmaac in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-20-2016, 01:08 AM
  2. [SOLVED] Convert DD-MMM to Text String
    By ScabbyDog in forum Excel General
    Replies: 9
    Last Post: 01-27-2016, 12:26 PM
  3. Replies: 4
    Last Post: 11-29-2015, 07:20 AM
  4. How to Convert Text in a String
    By jlutz in forum Excel General
    Replies: 2
    Last Post: 05-21-2015, 06:31 PM
  5. Convert Number to Text string
    By jonesad in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-24-2014, 05:46 AM
  6. Userform: Convert textbox value from string to type long
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-04-2011, 11:38 AM
  7. Convert text string help!
    By jenn7279 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-08-2007, 10:43 AM

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