+ Reply to Thread
Results 1 to 3 of 3

VBA to clear textbox within the dates.

Hybrid View

  1. #1
    Registered User
    Join Date
    08-12-2014
    Location
    Chicago, IL
    MS-Off Ver
    2010
    Posts
    7

    VBA to clear textbox within the dates.

    Good Morning everyone.

    I am looking for a VBA that would clear all the information in the calendar textbox days. So each month I can just easily push a button that would clear that month full of data. I would greatly appreciate the help.


    Thank you
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: VBA to clear textbox within the dates.

    I think the procedure below will do the trick. For what it's worth, though I noticed that you seem to have carefully crafted worksheet cells that are the size of each of your calendar days. Why not put your text in the cells, rather than in the textboxes you've built over the cells? Excel tends to be much more versatile when dealing with cells as opposed to textboxes.

    
    Sub Clear_TextBox()
    Dim tbx As Shape
    
    For Each tbx In ActiveSheet.Shapes
        If Not Intersect(tbx.TopLeftCell, Range("F10:T28")) Is Nothing Then
            tbx.TextFrame.Characters.Text = ""
        End If
    Next
    End Sub

  3. #3
    Registered User
    Join Date
    08-12-2014
    Location
    Chicago, IL
    MS-Off Ver
    2010
    Posts
    7

    Re: VBA to clear textbox within the dates.

    Thank you very much. That worked great and you are right I probably will use the cells instead.

+ 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] clear text from textbox's
    By Del117 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-18-2013, 09:51 PM
  2. [SOLVED] How to Clear default value from Textbox on click?
    By priya06manohar@gmail in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-09-2013, 08:30 PM
  3. Help to Format Dates in Textbox
    By folky15 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-14-2013, 03:41 AM
  4. Replies: 0
    Last Post: 02-05-2013, 09:11 AM
  5. [SOLVED] Clear Textbox, after clicking 2 times
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-14-2012, 06:32 PM
  6. Using dates from a textbox
    By Bigflem in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-09-2010, 12:24 PM
  7. Textbox (Working with Dates)
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-22-2008, 05:30 PM
  8. Clear Date textbox
    By tqm1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-31-2007, 08:35 AM

Tags for this Thread

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