Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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
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
data type inconsistency flyfisher Excel Discussion (Misc queries) 3 July 8th 09 11:09 AM
Excel inconsistency Robert Baer Excel Discussion (Misc queries) 4 April 17th 09 06:18 PM
XL2003 inconsistency fixed in XL2007? joeu2004 Excel Worksheet Functions 2 March 5th 07 05:59 PM
excel macro inconsistency JM Excel Discussion (Misc queries) 2 December 9th 04 01:13 AM
translate lotus 1-2-3 macro into excel macro using excel 2000 krutledge0209 Excel Programming 1 November 2nd 04 05:50 PM


All times are GMT +1. The time now is 06:09 PM.

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

About Us

"It's about Microsoft Excel"