Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Insert symbol

Gord,
we tryed the AutoCorrect function and it's working. Thanks for this code.
I will try this. I need the coding practice...

"Gord Dibben" wrote:

Frank

A macro won't run while you're in Edit Mode so you cannot set the cursor in
theside the cell text and have your symbol inserted.

You can have it inserted at beginning or end of existing text.

Sub Add_Symbolt()
Dim cell As Range
Dim moretext As String
Dim thisrng As Range
On Error GoTo endit
whichside = InputBox("Left = 1 or Right =2")
Set thisrng = Range(ActiveCell.Address & "," & Selection.Address) _
.SpecialCells(xlCellTypeConstants, xlTextValues)
moretext = Chr(216)
If whichside = 1 Then
For Each cell In thisrng
cell.Value = moretext & cell.Value
Next
Else
For Each cell In thisrng
cell.Value = cell.Value & moretext
Next
End If
Exit Sub
endit:
MsgBox "only formulas in range"
End Sub


Gord Dibben MS Excel MVP


On Thu, 22 Jun 2006 15:40:02 -0700, Frank E
wrote:

In most cases we want to insert the symbol after the text. What we really
want is the ability to press 1 key and insert the symbol before or after the
text.

"Gary''s Student" wrote:

A symbol is just a character in a special font. Do you want the symbol to
replace the text in the cell or precede the text in the cell or follow the
text in the cell?
--
Gary's Student


"Frank E" wrote:

I have created a macro that inserts a symbol into the active cell. If I have
entered text in a cell and try to use my macro it won't work. What code do I
need in my macro to enable me to insert my symbol while entering text?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Type a symbol useing shortcut keys rather the insert a symbol RJD Excel Discussion (Misc queries) 2 December 23rd 09 06:28 PM
CAN'T INSERT SYMBOL? Malcolm Austin Excel Worksheet Functions 4 October 21st 06 12:23 AM
Insert symbol Frank E Excel Discussion (Misc queries) 3 June 23rd 06 02:47 PM
insert symbol Santosh Excel Worksheet Functions 5 May 19th 05 05:31 AM
I need a symbol but "symbol" in the Insert menu is grayed-out. Nothappy Excel Discussion (Misc queries) 2 May 3rd 05 12:16 AM


All times are GMT +1. The time now is 08:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"