+ Reply to Thread
Results 1 to 7 of 7

VBA Script to replace blank cells with a "0"

  1. #1
    Registered User
    Join Date
    06-15-2014
    Location
    Cuthbert, Ga
    MS-Off Ver
    Office 2013
    Posts
    64

    VBA Script to replace blank cells with a "0"

    I understand that I could Google this, but ever example I've found on Google leads me to versions of Excel that are no longer used or the examples provided do not work with my code structure. If someone could simply post a quick example of how to make it work with my code, then I can pick up the rest myself. What I'd like to have the code automatically add a "0" to any textboxes left blank when the user hits the "Done" button. Thank you in advanced and here is my code:

    Please Login or Register  to view this content.
    Last edited by drsadistic; 08-08-2014 at 03:54 PM.

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: VBA Script to replace blank cells with a "0"

    Please Login or Register  to view this content.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: VBA Script to replace blank cells with a "0"

    Please Login or Register  to view this content.
    Ben Van Johnson

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: VBA Script to replace blank cells with a "0"

    Your requirement is not clear.

    What Textboxes?

    if you mean the worksheet range.

    Please Login or Register  to view this content.
    Last edited by mehmetcik; 08-08-2014 at 03:52 PM.

  5. #5
    Registered User
    Join Date
    06-15-2014
    Location
    Cuthbert, Ga
    MS-Off Ver
    Office 2013
    Posts
    64

    Re: VBA Script to replace blank cells with a "0"

    Thank you everyone for your contributions! I appreciate the help.

  6. #6
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: VBA Script to replace blank cells with a "0"

    Thank you for marking the thread as solved.

    On any thread you can show appreciation to those who have helped by clicking the * below their post.

  7. #7
    Registered User
    Join Date
    06-15-2014
    Location
    Cuthbert, Ga
    MS-Off Ver
    Office 2013
    Posts
    64

    Re: VBA Script to replace blank cells with a "0"

    Reputation added.

+ 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. Slow "comparison/replace" script
    By mavCZ in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-12-2014, 06:03 AM
  2. [SOLVED] Replace all BLANK cells in column with header title "Balance" to "0"
    By ks100 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-21-2014, 09:25 AM
  3. [SOLVED] Script to save to folder in "v:\dept2", confirm file saved, then delete from "v:\dept1"
    By ks100 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-28-2014, 11:42 AM
  4. Replies: 3
    Last Post: 02-16-2011, 02:55 PM
  5. Macro to replace emplty cells with "(blank)" text
    By kapil in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-03-2010, 03:04 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