Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel macro inconsistency
I recorded a macro which selects a column and then
replaces all instances of "-" with "". I cut and pasted the recorded code into a larger macro. If I run the macro it does not execute the replacement, but does not generate any errors. If I step through the macro via the debugger the replace executes properly. Anyone know what is going on? Some kind of timing issue? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel macro inconsistency
Pls. post the code.
KL "JM" wrote in message ... I recorded a macro which selects a column and then replaces all instances of "-" with "". I cut and pasted the recorded code into a larger macro. If I run the macro it does not execute the replacement, but does not generate any errors. If I step through the macro via the debugger the replace executes properly. Anyone know what is going on? Some kind of timing issue? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel macro inconsistency
Hi
see your other post -- Regards Frank Kabel Frankfurt, Germany "JM" schrieb im Newsbeitrag ... I recorded a macro which selects a column and then replaces all instances of "-" with "". I cut and pasted the recorded code into a larger macro. If I run the macro it does not execute the replacement, but does not generate any errors. If I step through the macro via the debugger the replace executes properly. Anyone know what is going on? Some kind of timing issue? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel macro inconsistency
Columns("B:B").Select
Selection.Replace What:="-", Replacement:="", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False This code is in a procedure, and is called within the same module. If I step through the code it works fine. JM -----Original Message----- Pls. post the code. KL "JM" wrote in message ... I recorded a macro which selects a column and then replaces all instances of "-" with "". I cut and pasted the recorded code into a larger macro. If I run the macro it does not execute the replacement, but does not generate any errors. If I step through the macro via the debugger the replace executes properly. Anyone know what is going on? Some kind of timing issue? . |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel macro inconsistency
Code posted in reply to KL
-----Original Message----- Hi see your other post -- Regards Frank Kabel Frankfurt, Germany "JM" schrieb im Newsbeitrag ... I recorded a macro which selects a column and then replaces all instances of "-" with "". I cut and pasted the recorded code into a larger macro. If I run the macro it does not execute the replacement, but does not generate any errors. If I step through the macro via the debugger the replace executes properly. Anyone know what is going on? Some kind of timing issue? . |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel macro inconsistency
Hi
try: Activesheet.columns("B:B").Replace What:="-", Replacement:="", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False -- Regards Frank Kabel Frankfurt, Germany "JM" schrieb im Newsbeitrag ... Columns("B:B").Select Selection.Replace What:="-", Replacement:="", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False This code is in a procedure, and is called within the same module. If I step through the code it works fine. JM -----Original Message----- Pls. post the code. KL "JM" wrote in message ... I recorded a macro which selects a column and then replaces all instances of "-" with "". I cut and pasted the recorded code into a larger macro. If I run the macro it does not execute the replacement, but does not generate any errors. If I step through the macro via the debugger the replace executes properly. Anyone know what is going on? Some kind of timing issue? . |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel macro inconsistency
I figured it out, actually. I was running a query and then
formatting the data, but the query was not finished before the formatting started. I set the backgroundquery condition on the refresh command to false, and now ti the timing is fine. Thanks though! -----Original Message----- Hi try: Activesheet.columns("B:B").Replace What:="-", Replacement:="", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False -- Regards Frank Kabel Frankfurt, Germany "JM" schrieb im Newsbeitrag ... Columns("B:B").Select Selection.Replace What:="-", Replacement:="", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False This code is in a procedure, and is called within the same module. If I step through the code it works fine. JM -----Original Message----- Pls. post the code. KL "JM" wrote in message ... I recorded a macro which selects a column and then replaces all instances of "-" with "". I cut and pasted the recorded code into a larger macro. If I run the macro it does not execute the replacement, but does not generate any errors. If I step through the macro via the debugger the replace executes properly. Anyone know what is going on? Some kind of timing issue? . . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
data type inconsistency | Excel Discussion (Misc queries) | |||
Excel inconsistency | Excel Discussion (Misc queries) | |||
XL2003 inconsistency fixed in XL2007? | Excel Worksheet Functions | |||
excel macro inconsistency | Excel Discussion (Misc queries) | |||
translate lotus 1-2-3 macro into excel macro using excel 2000 | Excel Programming |