View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Error Message "Formula is too long"

Put it in your personal.xls in a general module.

If you don't have a personal.xls, the record a macro and excel will offer to
create one when it asks you where to store the macro. Once it is created,
you can put your code there and it will be available in
Tools=Macro=Macros... Select your macro and hit run. As written it works
on the selected cells.

--
Regards,
Tom Ogilvy

wrote in message
...
On Mon, 27 Sep 2004 14:49:21 -0400, "Tom Ogilvy"
wrote:

Well, you could only select the cells you want to process or it could

stop
when it hits a blank cell

Dim sStr as String, cell as Range
for each cell in selection
if isempty(cell) then exit for
sStr = cell
sStr = Application.Substitute(sStr,"-- Modified by: ABC","")
sStr = Application.Substitute(sStr,chr(13),"")
cell.value = sStr
Next


Tom,

Last item.....

Is there a way to make this macro available to all worksheets?

TIA

Bob