Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Problems ignoring error message

I do a search and replace, but if no data match the search then I want to ignore the message. This is my code, but I get a runtime error: 1004

Application.DisplayAlerts = False 'If no commas are found error message is ignored
Range("D2:D97").Select
Selection.Replace What:=",", Replacement:=".", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=True

What to do, what to do?
Schwartz
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Problems ignoring error message

I don't get an error message if no commas are found. Are you sure that is
what the error message is? Perhaps changing a comma to a period is causing
an error in a formula.

--
Regards,
Tom Ogilvy

"Dr. Schwartz" wrote in message
...
I do a search and replace, but if no data match the search then I want to

ignore the message. This is my code, but I get a runtime error: 1004

Application.DisplayAlerts = False 'If no commas are found error message is

ignored
Range("D2:D97").Select
Selection.Replace What:=",", Replacement:=".", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=True

What to do, what to do?
Schwartz



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
sorting problems - error message: identically sized merged cells. 4markw Excel Discussion (Misc queries) 2 January 5th 10 06:28 PM
Subtotal ignoring Error Values Werner Rohrmoser Excel Worksheet Functions 7 November 25th 08 05:44 PM
Sum ignoring cells with error JRD Excel Worksheet Functions 1 December 12th 07 05:27 PM
Ignoring error values in a formula Nicola Excel Worksheet Functions 1 September 14th 06 04:07 PM
File Sharing Problems - Error Message Kristi - Skills Group Excel Discussion (Misc queries) 1 December 17th 04 05:50 PM


All times are GMT +1. The time now is 09:10 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"