ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Replace Function (https://www.excelbanter.com/excel-programming/272203-re-replace-function.html)

Yossi Shalom

Replace Function
 


The first 5-6 arguments are the same, but the rest are not, and it
doesnt make the replace.
thanks again.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Chip Pearson

Replace Function
 
Yossi,

Post the code you are using in Excel 97 and the code you are using
in Excel 2002.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Yossi Shalom" wrote in message
...


The first 5-6 arguments are the same, but the rest are not, and

it
doesnt make the replace.
thanks again.

*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!




Yossi Shalom

Replace Function
 
the code :
colum.Replace What:="c:\pikuhit\[1000.xls]", Replacement:="c:\pikuhit\"
& year_taagid & "\[" & num_taagid & ".xls]", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, MatchControlCharacters:=False,
_
MatchDiacritics:=False, MatchKashida:=False, MatchAlefHamza:=False

This is the code in 97.
Untill MatchCase, its the same.
If i run this code I get error.
When I change, it doesnt give error but do nothing.

Thanks


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Chip Pearson

Replace Function
 
Yossi,

Unless you need the arguments after the MatchCase argument, you
can omit them. They apply only, I think, to Far East versions of
Excel. If you want to use all the arguments, use code like

#IF VBA6 THen
' Excel 2000 version of Replace
#Else
' Exce 97 version of Replace
#End IF


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"Yossi Shalom" wrote in message
...
the code :
colum.Replace What:="c:\pikuhit\[1000.xls]",

Replacement:="c:\pikuhit\"
& year_taagid & "\[" & num_taagid & ".xls]", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False,

MatchControlCharacters:=False,
_
MatchDiacritics:=False, MatchKashida:=False,

MatchAlefHamza:=False

This is the code in 97.
Untill MatchCase, its the same.
If i run this code I get error.
When I change, it doesnt give error but do nothing.

Thanks


*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!




Yossi Shalom

Replace Function
 

Hi again.
Its working now.
The problem was that the worksheet was protected.
I unprotected it and it worked.
In Excel 97 you dont need to unprotect the worksheet in order to use
Replace function.

Thank you very much for the support.
I hope that i wont use it again.

Yossi Shalom.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


All times are GMT +1. The time now is 05:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com