Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
that is pretty limited
Try something like this: In the Worksheets Change event put in this code Private Sub Worksheet_Change(ByVal Target As Range Set isect = Application.Intersect(Target, Range("a1") If Not isect Is Nothing and Target.Value < "" The for x = 1 to Len(Target.Value If Mid(Target, x,1) Not Like "[A-Za-z0-9]" the Msgbox "Use Letters and Numbers Only! Target.Selec Target.Value="" End I End i End Sub ----- Bob Flanagan wrote: ---- newName = Application.Substitute(activecell.value, "/", "" Bob Flanaga Macro System http://www.add-ins.co Productivity add-ins and downloadable books on VB macros for Exce "Ron McCormick" wrote in messag .. I am wanting to enter data on a sheet and then rename the sheet as th cell contents of a particular cell on the sheet. by programmaticall pasting the cell contents as the sheetname. Trouble is the contents of th sheet are set by users and they have used chracters such as / or \ withi the cell. Is there a simple way of removing such characters TI |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Removing 2-3 characters at the end | Excel Worksheet Functions | |||
Removing characters | Excel Discussion (Misc queries) | |||
Removing characters | Excel Discussion (Misc queries) | |||
Formula to replace invalid filename characters | Excel Worksheet Functions | |||
Invalid characters in Excel | Excel Programming |