Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
I have a problem with macros. I have a macro that used to work as desired, and now it only works the first time Excel is opened, then it doesn't run at all: Sub RemoveLetters() Selection.Replace What:="a", Replacement:="", MatchCase:=False Selection.Replace What:="b", Replacement:="", MatchCase:=False Selection.Replace What:="c", Replacement:="", MatchCase:=False Selection.Replace What:="d", Replacement:="", MatchCase:=False Selection.Replace What:="e", Replacement:="", MatchCase:=False Selection.Replace What:="f", Replacement:="", MatchCase:=False Selection.Replace What:="g", Replacement:="", MatchCase:=False Selection.Replace What:="h", Replacement:="", MatchCase:=False Selection.Replace What:="i", Replacement:="", MatchCase:=False Selection.Replace What:="j", Replacement:="", MatchCase:=False Selection.Replace What:="k", Replacement:="", MatchCase:=False Selection.Replace What:="l", Replacement:="", MatchCase:=False Selection.Replace What:="m", Replacement:="", MatchCase:=False Selection.Replace What:="n", Replacement:="", MatchCase:=False Selection.Replace What:="o", Replacement:="", MatchCase:=False Selection.Replace What:="p", Replacement:="", MatchCase:=False Selection.Replace What:="q", Replacement:="", MatchCase:=False Selection.Replace What:="r", Replacement:="", MatchCase:=False Selection.Replace What:="s", Replacement:="", MatchCase:=False Selection.Replace What:="t", Replacement:="", MatchCase:=False Selection.Replace What:="u", Replacement:="", MatchCase:=False Selection.Replace What:="v", Replacement:="", MatchCase:=False Selection.Replace What:="w", Replacement:="", MatchCase:=False Selection.Replace What:="x", Replacement:="", MatchCase:=False Selection.Replace What:="y", Replacement:="", MatchCase:=False Selection.Replace What:="z", Replacement:="", MatchCase:=False Selection.Replace What:="~*", Replacement:="", MatchCase:=False Selection.Replace What:="--*", Replacement:="", MatchCase:=False Selection.Replace What:="-", Replacement:="0", LookAt:=xlWhole, MatchCase:=False End Sub If I close Excel, and then open it again, the macro works once, then doesn't work again, until I close and reopen Excel. Any idea why this is? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro works - very quick | Excel Discussion (Misc queries) | |||
macro that works one time every day | Excel Discussion (Misc queries) | |||
Macro works in one workbook but not in another | Excel Programming | |||
Macro works once, not twice | Excel Programming | |||
macro works in .xlt but not .xls | Excel Programming |