ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I display character count on the status bar? (https://www.excelbanter.com/excel-worksheet-functions/187671-how-do-i-display-character-count-status-bar.html)

user061803

How do I display character count on the status bar?
 
Hello -

I need the counter in the status bar that will show me how many characters
are in each cell.

Billy Liddel

How do I display character count on the status bar?
 
Right-Click the worksheet tab and choose View Code, then copy the following
code

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
c = Len(ActiveCell)
Application.StatusBar = c & " characters"
End Sub

Peter

"user061803" wrote:

Hello -

I need the counter in the status bar that will show me how many characters
are in each cell.


Billy Liddel

How do I display character count on the status bar?
 
You should also use the following

Private Sub Worksheet_Deactivate()
Application.StatusBar = ""
End Sub

and in the workbook module:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.StatusBar = ""
End Sub

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Application.StatusBar = ""
End Sub

Private Sub Workbook_Deactivate()
Application.StatusBar = ""
End Sub

Just to tidy things up

Peter

"Billy Liddel" wrote:

Right-Click the worksheet tab and choose View Code, then copy the following
code

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
c = Len(ActiveCell)
Application.StatusBar = c & " characters"
End Sub

Peter

"user061803" wrote:

Hello -

I need the counter in the status bar that will show me how many characters
are in each cell.



All times are GMT +1. The time now is 12:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com