PC Review


Reply
Thread Tools Rate Thread

How do I get Excel to enter a cell and delete the last character typed?

 
 
Shaka215@gmail.com
Guest
Posts: n/a
 
      3rd Jan 2007
Hello! Any help with this issue is much appreciated...What I am trying
to do is have a macro enter a cell of the end-user's choice and delete
the last character in that cell. I have tried to all sorts of things
including SENDKEY but the problem is it deletes the entire contents of
the active cell...I just need a macro to work as a backspace to delete
the last character entered...any ideas? Any help is much appreciated!!!
Thanks so much!

Example...

CELL ORINGAL TEXT = "Buttons"
=========================
Macro ran once.. = "Button"
Macro ran twice.. = "Butto"
Macro ran trice.. = "Butt"
and so on...

 
Reply With Quote
 
 
 
 
Ron Rosenfeld
Guest
Posts: n/a
 
      3rd Jan 2007
On 2 Jan 2007 16:18:10 -0800, (E-Mail Removed) wrote:

>Hello! Any help with this issue is much appreciated...What I am trying
>to do is have a macro enter a cell of the end-user's choice and delete
>the last character in that cell. I have tried to all sorts of things
>including SENDKEY but the problem is it deletes the entire contents of
>the active cell...I just need a macro to work as a backspace to delete
>the last character entered...any ideas? Any help is much appreciated!!!
>Thanks so much!
>
>Example...
>
>CELL ORINGAL TEXT = "Buttons"
>=========================
>Macro ran once.. = "Button"
>Macro ran twice.. = "Butto"
>Macro ran trice.. = "Butt"
>and so on...


Perhaps something like:

---------------------------
Sub DelLastChar()
If Len(Selection.Text) > 0 Then
Selection.Value = Left(Selection.Text, Len(Selection.Text) - 1)
End If
End Sub
------------------------


--ron
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Challenge - Excel Line Feed Character CHR(10) - How to Delete and keep the text formatting without going ro single line in a cell ? Microsoft Excel Programming 6 7th Oct 2009 12:28 PM
Challenge - Excel Line Feed Character CHR(10) - How to Delete and keep the text formatting without going ro single line in a cell ? Microsoft Excel Worksheet Functions 7 7th Oct 2009 11:10 AM
If cell has any character typed in it cell curser moves to next c =?Utf-8?B?Rm9ybSBtYWtlcg==?= Microsoft Excel Misc 1 18th Dec 2006 03:15 AM
How to put line feed in a cell using a character not Alt/Enter =?Utf-8?B?RGF2aWQgQ3Jvd3RoZXI=?= Microsoft Excel Misc 1 3rd Oct 2005 06:59 PM
Excel Macro to edit and delete one character in a cell David Microsoft Excel Programming 5 8th Dec 2004 12:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:16 PM.