+ Reply to Thread
Results 1 to 3 of 3

Textbox Empty to Return 0 as value to the cell

  1. #1
    Registered User
    Join Date
    04-30-2014
    Location
    england
    MS-Off Ver
    Microsoft Excel 365
    Posts
    67

    Textbox Empty to Return 0 as value to the cell

    Greetings to all excel gurus,

    May I know what is the possible way to achieve for what I want the UserForm to be?

    I have 26 text box to be fill and all these text box can leave for empty if there is no sales to enter.

    However I notice is empty text box it would cause my autosum not working correct therefore is it anyway I can replace the empty textbox value to 0 by default?

    Here is my VBA code:

    Please Login or Register  to view this content.
    Thank you.
    Last edited by lazyserv; 05-27-2015 at 04:25 AM. Reason: solved

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Textbox Empty to Return 0 as value to the cell

    you could just set up the default value to be 0

    or you could put "0" + infront
    Please Login or Register  to view this content.
    ps you should probably write a loop for your code...instead of having to write up the thing 20 odd times
    Last edited by humdingaling; 05-26-2015 at 10:57 PM.
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    04-30-2014
    Location
    england
    MS-Off Ver
    Microsoft Excel 365
    Posts
    67

    Re: Textbox Empty to Return 0 as value to the cell

    Quote Originally Posted by humdingaling View Post
    you could just set up the default value to be 0

    or you could put "0" + infront
    Please Login or Register  to view this content.
    ps you should probably write a loop for your code...instead of having to write up the thing 20 odd times
    Problem solved! thanks mate!! +rep for your help

+ 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. Place Textbox Value to the next empty cell
    By weeeee0713 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-25-2014, 04:20 AM
  2. [SOLVED] Transfer textbox value to next empty cell under same row
    By smartbuyer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-24-2014, 01:01 AM
  3. [SOLVED] Checking for empty textbox and setfocus the empty textbox
    By subbby in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-23-2013, 02:49 PM
  4. Textbox.caption to cell if empty, how?
    By WTG in forum Excel General
    Replies: 2
    Last Post: 02-27-2005, 01:06 AM
  5. [SOLVED] Textbox.caption to cell if empty, how?
    By WTG in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-27-2005, 01:06 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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1