+ Reply to Thread
Results 1 to 8 of 8

Display in a textbox, the character count of a cell, when the cell is selected

Hybrid View

Pavan Renjal Display in a textbox, the... 01-02-2013, 04:54 PM
stnkynts Re: Display in a textbox, the... 01-02-2013, 06:02 PM
Pavan Renjal Re: Display in a textbox, the... 01-03-2013, 05:23 AM
stnkynts Re: Display in a textbox, the... 01-03-2013, 11:38 AM
Pavan Renjal Re: Display in a textbox, the... 01-03-2013, 01:56 PM
Pavan Renjal Re: Display in a textbox, the... 01-05-2013, 03:41 PM
stnkynts Re: Display in a textbox, the... 01-11-2013, 07:38 PM
Pavan Renjal Re: Display in a textbox, the... 01-13-2013, 07:11 AM
  1. #1
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Display in a textbox, the character count of a cell, when the cell is selected

    Like this:

    Private Sub Worksheet_Change(ByVal Target As Range)
    
    If Not Intersect(Target, Range("A1")) Is Nothing Then
        TextBox1.Text = Len(Sheets("Sheet1").Range("A1").Value)
    End If
    
    End Sub
    You will need to use an activex TextBox for this to work. Put the code in the Worksheet Change event. Edit the range and name of textbox according to your need.
    Last edited by stnkynts; 01-02-2013 at 06:05 PM.

  2. #2
    Registered User
    Join Date
    12-24-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    99

    Re: Display in a textbox, the character count of a cell, when the cell is selected

    How can i make this work for any cell i click on a worksheet? Also, i need to know if we can implement for a range of cells say A1:A10. I want to try both these cases.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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