View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Flanagan Bob Flanagan is offline
external usenet poster
 
Posts: 340
Default Removing invalid characters from proposed sheet name


newName = Application.Substitute(activecell.value, "/", "")

Bob Flanagan
Macro Systems
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel

"Ron McCormick" wrote in message
...
I am wanting to enter data on a sheet and then rename the sheet as the

cell contents of a particular cell on the sheet. by programmatically
pasting the cell contents as the sheetname. Trouble is the contents of the
sheet are set by users and they have used chracters such as / or \ within
the cell. Is there a simple way of removing such characters?

TIA