Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default controlling the Range.Replace method.

Thanks in advance,

I have a problem when ttrying to use the range.replace method in excel. If I
have left the find/replace environment in "within" "Workbook" mode and run my
VBA code. The routine will update the entire workbook instead of the selected
range as I would expect.

Is ther a way in VBA to reset the "within" setting to "sheet" prior to
executing the Replace method?

Also, can anyone give a quick explination to Searchformat & ReplaceFormat
parameters to this function. I can only find examples where they are set to
false. And the Microsoft documentation is not very helpful.

--
Tom Casey
Project Supervisor
sanofi-aventis
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default controlling the Range.Replace method.

Sorry
Office 2003 Professional SP2
--
Tom Casey
Project Supervisor
sanofi-aventis


"T-Casey" wrote:

Thanks in advance,

I have a problem when ttrying to use the range.replace method in excel. If I
have left the find/replace environment in "within" "Workbook" mode and run my
VBA code. The routine will update the entire workbook instead of the selected
range as I would expect.

Is ther a way in VBA to reset the "within" setting to "sheet" prior to
executing the Replace method?

Also, can anyone give a quick explination to Searchformat & ReplaceFormat
parameters to this function. I can only find examples where they are set to
false. And the Microsoft documentation is not very helpful.

--
Tom Casey
Project Supervisor
sanofi-aventis

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default controlling the Range.Replace method.

Resetting the search scope:
http://groups.google.com/group/micro...6082458637e4e6

For the formattting options, recording a macro while searching using
formatting will give you a good idea of the syntax.

Eg:

Application.FindFormat.Clear
With Application.FindFormat.Interior
.ColorIndex = 6
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With


Tim


"T-Casey" wrote in message
...
Thanks in advance,

I have a problem when ttrying to use the range.replace method in excel. If
I
have left the find/replace environment in "within" "Workbook" mode and run
my
VBA code. The routine will update the entire workbook instead of the
selected
range as I would expect.

Is ther a way in VBA to reset the "within" setting to "sheet" prior to
executing the Replace method?

Also, can anyone give a quick explination to Searchformat & ReplaceFormat
parameters to this function. I can only find examples where they are set
to
false. And the Microsoft documentation is not very helpful.

--
Tom Casey
Project Supervisor
sanofi-aventis



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default controlling the Range.Replace method.

Thank you Tim. I never payed attention to the formatting FIND options. I will
have to consider if these options will be helpful.

I really need an answer to the first part. It is a real problem for the
solution I am designing.

--
Tom Casey
Project Supervisor
sanofi-aventis


"Tim Williams" wrote:

Resetting the search scope:
http://groups.google.com/group/micro...6082458637e4e6

For the formattting options, recording a macro while searching using
formatting will give you a good idea of the syntax.

Eg:

Application.FindFormat.Clear
With Application.FindFormat.Interior
.ColorIndex = 6
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With


Tim


"T-Casey" wrote in message
...
Thanks in advance,

I have a problem when ttrying to use the range.replace method in excel. If
I
have left the find/replace environment in "within" "Workbook" mode and run
my
VBA code. The routine will update the entire workbook instead of the
selected
range as I would expect.

Is ther a way in VBA to reset the "within" setting to "sheet" prior to
executing the Replace method?

Also, can anyone give a quick explination to Searchformat & ReplaceFormat
parameters to this function. I can only find examples where they are set
to
false. And the Microsoft documentation is not very helpful.

--
Tom Casey
Project Supervisor
sanofi-aventis




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default controlling the Range.Replace method.


"T-Casey" wrote in message
...
Thank you Tim. I never payed attention to the formatting FIND options. I
will
have to consider if these options will be helpful.

I really need an answer to the first part. It is a real problem for the
solution I am designing.


Tom,

The solution in the link I included (from PeterT) didn't work for you ?
Here's the relvant part:

******************
I always reset it -

On Error Resume Next
Set r = Cells.Find(What:="", _
LookIn:=xlFormulas, _
SearchOrder:=xlRows, _
LookAt:=xlPart, _
MatchCase:=False)
On Error GoTo 0
******************


Tim


--
Tom Casey
Project Supervisor
sanofi-aventis


"Tim Williams" wrote:

Resetting the search scope:
http://groups.google.com/group/micro...6082458637e4e6

For the formattting options, recording a macro while searching using
formatting will give you a good idea of the syntax.

Eg:

Application.FindFormat.Clear
With Application.FindFormat.Interior
.ColorIndex = 6
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With


Tim


"T-Casey" wrote in message
...
Thanks in advance,

I have a problem when ttrying to use the range.replace method in excel.
If
I
have left the find/replace environment in "within" "Workbook" mode and
run
my
VBA code. The routine will update the entire workbook instead of the
selected
range as I would expect.

Is ther a way in VBA to reset the "within" setting to "sheet" prior to
executing the Replace method?

Also, can anyone give a quick explination to Searchformat &
ReplaceFormat
parameters to this function. I can only find examples where they are
set
to
false. And the Microsoft documentation is not very helpful.

--
Tom Casey
Project Supervisor
sanofi-aventis








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default controlling the Range.Replace method.

sorry for the delay, but ...

Thank you Tim. This is the solution to my problem

--
Tom Casey
Project Supervisor
sanofi-aventis


"Tim Williams" wrote:


"T-Casey" wrote in message
...
Thank you Tim. I never payed attention to the formatting FIND options. I
will
have to consider if these options will be helpful.

I really need an answer to the first part. It is a real problem for the
solution I am designing.


Tom,

The solution in the link I included (from PeterT) didn't work for you ?
Here's the relvant part:

******************
I always reset it -

On Error Resume Next
Set r = Cells.Find(What:="", _
LookIn:=xlFormulas, _
SearchOrder:=xlRows, _
LookAt:=xlPart, _
MatchCase:=False)
On Error GoTo 0
******************


Tim


--
Tom Casey
Project Supervisor
sanofi-aventis


"Tim Williams" wrote:

Resetting the search scope:
http://groups.google.com/group/micro...6082458637e4e6

For the formattting options, recording a macro while searching using
formatting will give you a good idea of the syntax.

Eg:

Application.FindFormat.Clear
With Application.FindFormat.Interior
.ColorIndex = 6
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With


Tim


"T-Casey" wrote in message
...
Thanks in advance,

I have a problem when ttrying to use the range.replace method in excel.
If
I
have left the find/replace environment in "within" "Workbook" mode and
run
my
VBA code. The routine will update the entire workbook instead of the
selected
range as I would expect.

Is ther a way in VBA to reset the "within" setting to "sheet" prior to
executing the Replace method?

Also, can anyone give a quick explination to Searchformat &
ReplaceFormat
parameters to this function. I can only find examples where they are
set
to
false. And the Microsoft documentation is not very helpful.

--
Tom Casey
Project Supervisor
sanofi-aventis






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
replace method using ReplaceFormat ..... SAm Excel Programming 4 July 19th 07 12:56 AM
Replace method problems Liz Excel Programming 3 June 14th 07 04:43 PM
Can't Dim Range when Controlling Word from Excel T_o_n_y Excel Programming 2 July 29th 06 11:56 PM
Replace method - cannot find any data to replace Mike Excel Programming 5 April 6th 06 08:56 PM
Little problem with the REPLACE method. jase[_2_] Excel Programming 2 November 17th 05 01:53 PM


All times are GMT +1. The time now is 10:21 AM.

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

About Us

"It's about Microsoft Excel"