View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default macro to remove a named range always called "database" & if possib

sub Cleanup()
With ActiveWorkbook
.Names("Database").RefersToRange.ClearContents
.Names("Database").Delete
Application.DisplayAlerts = False
.SaveAs Thisworkbook.FullName, xlWorkbook.Normal
Application.DisplayAlerts = True
End With
End sub

Saying you want to remove a named range is a bit ambiguous. You can modify
the above to suit you needs.

--
Regards,
Tom Ogilvy


"Todd F." wrote in message
...
I need a macro to remove a named range in a worksheet always called
"database" also it would be great to add to this functionality the ability

to
save the sheet as it is named in the most current excel file format.
Currently it is saving out of a report writer as Excel version 3.

I would fire it off while the workbook is open and active - there may be
other work books open that I would want to be left alone.


Getting back into macro's after awhile away so rusty. I assume I would put
this marco in personal to be accessable to the many sheets like this I

deal
with a day. But if you prefer to stick it elsewhere no problem.

Thanks Todd Frisch