Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a way to make a cell have a character counter? The cell is validated
to only allow 30 characters. I need to put in a counter that as the person types, it shows they are on character "13/50" and keeps counting as they type. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
macros don't run (for any practical purpose) while a user is editing a cell.
-- Regards, Tom Ogilvy "jeffbert" wrote: Is there a way to make a cell have a character counter? The cell is validated to only allow 30 characters. I need to put in a counter that as the person types, it shows they are on character "13/50" and keeps counting as they type. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
So if I entered a text box, would this be possible?
If not, what is the most practical way to achive this? "Tom Ogilvy" wrote: macros don't run (for any practical purpose) while a user is editing a cell. -- Regards, Tom Ogilvy "jeffbert" wrote: Is there a way to make a cell have a character counter? The cell is validated to only allow 30 characters. I need to put in a counter that as the person types, it shows they are on character "13/50" and keeps counting as they type. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes. A textbox from the control toolbox toolbar has a Change event that
fires on each keystroke, so this would support what you want to do. -- Regards, Tom Ogilvy "jeffbert" wrote: So if I entered a text box, would this be possible? If not, what is the most practical way to achive this? "Tom Ogilvy" wrote: macros don't run (for any practical purpose) while a user is editing a cell. -- Regards, Tom Ogilvy "jeffbert" wrote: Is there a way to make a cell have a character counter? The cell is validated to only allow 30 characters. I need to put in a counter that as the person types, it shows they are on character "13/50" and keeps counting as they type. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Not to wear out your patience, but I am an extreme novice in VB. Do you have
a sample of the code I could manipulate? Thanks again "Tom Ogilvy" wrote: Yes. A textbox from the control toolbox toolbar has a Change event that fires on each keystroke, so this would support what you want to do. -- Regards, Tom Ogilvy "jeffbert" wrote: So if I entered a text box, would this be possible? If not, what is the most practical way to achive this? "Tom Ogilvy" wrote: macros don't run (for any practical purpose) while a user is editing a cell. -- Regards, Tom Ogilvy "jeffbert" wrote: Is there a way to make a cell have a character counter? The cell is validated to only allow 30 characters. I need to put in a counter that as the person types, it shows they are on character "13/50" and keeps counting as they type. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
put in a textbox from the control toolbox toolbar
Right click on it and select view code. Put in code like this: (assumes the name is Textbox1) Private Sub TextBox1_Change() If Len(TextBox1.Text) 30 Then TextBox1.Value = Left(TextBox1.Text, 30) End If Set rng = TextBox1.TopLeftCell.Offset(0, -1) rng.Value = "'" & Len(TextBox1.Text) & "/30" End Sub -- regards, Tom Ogilvy "jeffbert" wrote: Not to wear out your patience, but I am an extreme novice in VB. Do you have a sample of the code I could manipulate? Thanks again "Tom Ogilvy" wrote: Yes. A textbox from the control toolbox toolbar has a Change event that fires on each keystroke, so this would support what you want to do. -- Regards, Tom Ogilvy "jeffbert" wrote: So if I entered a text box, would this be possible? If not, what is the most practical way to achive this? "Tom Ogilvy" wrote: macros don't run (for any practical purpose) while a user is editing a cell. -- Regards, Tom Ogilvy "jeffbert" wrote: Is there a way to make a cell have a character counter? The cell is validated to only allow 30 characters. I need to put in a counter that as the person types, it shows they are on character "13/50" and keeps counting as they type. |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Works beautifully. Thanks again.
"Tom Ogilvy" wrote: put in a textbox from the control toolbox toolbar Right click on it and select view code. Put in code like this: (assumes the name is Textbox1) Private Sub TextBox1_Change() If Len(TextBox1.Text) 30 Then TextBox1.Value = Left(TextBox1.Text, 30) End If Set rng = TextBox1.TopLeftCell.Offset(0, -1) rng.Value = "'" & Len(TextBox1.Text) & "/30" End Sub -- regards, Tom Ogilvy "jeffbert" wrote: Not to wear out your patience, but I am an extreme novice in VB. Do you have a sample of the code I could manipulate? Thanks again "Tom Ogilvy" wrote: Yes. A textbox from the control toolbox toolbar has a Change event that fires on each keystroke, so this would support what you want to do. -- Regards, Tom Ogilvy "jeffbert" wrote: So if I entered a text box, would this be possible? If not, what is the most practical way to achive this? "Tom Ogilvy" wrote: macros don't run (for any practical purpose) while a user is editing a cell. -- Regards, Tom Ogilvy "jeffbert" wrote: Is there a way to make a cell have a character counter? The cell is validated to only allow 30 characters. I need to put in a counter that as the person types, it shows they are on character "13/50" and keeps counting as they type. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
dynamic character counter for merged cell text field | Excel Worksheet Functions | |||
How do I type text in a cell? | New Users to Excel | |||
how to convert date type to text type | Excel Discussion (Misc queries) | |||
multiple file uploading - runtime error'13': type mismatch "While Counter <= UBound(FName)" | Excel Discussion (Misc queries) | |||
I want to type a text in a cell, but I want that text to represen. | Excel Discussion (Misc queries) |