Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
DELETE NAMES
HOW can i delete all the names that starts with the letter "F" in a workbook
..(with vba) |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
DELETE NAMES
Hi Gus,
Do you want to delete 'Worsheets' or names in cells or what? ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
DELETE NAMES
range names
"gus" wrote in message ... HOW can i delete all the names that starts with the letter "F" in a workbook .(with vba) |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
DELETE NAMES
for each nm in ThisWorkbook.Names
if Ucase(Left(nm.name,1)) = "F" then nm.Delete end if Next -- Regards, Tom Ogilvy "gus" wrote in message ... HOW can i delete all the names that starts with the letter "F" in a workbook .(with vba) |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
DELETE NAMES
Tom..
Finally.. I can correct the master :) Your code will remove a name like Form1!number.. Following should be a bit more precise. Sub NameFkiller() Dim nm As Name For Each nm In ActiveWorkbook.Names If nm.Name Like "*[!]f*" Or _ (nm.Name Like "f*" And Not nm.Name Like "*[!]*") Then nm.Delete End If Next End Sub keepITcool < email : keepitcool chello nl (with @ and .) < homepage: http://members.chello.nl/keepitcool "Tom Ogilvy" wrote: for each nm in ThisWorkbook.Names if Ucase(Left(nm.name,1)) = "F" then nm.Delete end if Next |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
DELETE NAMES
Good correction, but probably Overcome by Events. Based on his other posts,
he is just trying to delete one corrupted name. (and it appeared to be workbook level <g). -- Regards, Tom Ogilvy "keepitcool" wrote in message ... Tom.. Finally.. I can correct the master :) Your code will remove a name like Form1!number.. Following should be a bit more precise. Sub NameFkiller() Dim nm As Name For Each nm In ActiveWorkbook.Names If nm.Name Like "*[!]f*" Or _ (nm.Name Like "f*" And Not nm.Name Like "*[!]*") Then nm.Delete End If Next End Sub keepITcool < email : keepitcool chello nl (with @ and .) < homepage: http://members.chello.nl/keepitcool "Tom Ogilvy" wrote: for each nm in ThisWorkbook.Names if Ucase(Left(nm.name,1)) = "F" then nm.Delete end if Next |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Delete Table Names | New Users to Excel | |||
How to delete names on worksheet? | Excel Discussion (Misc queries) | |||
Delete defined names | Excel Discussion (Misc queries) | |||
Delete names from a list | Excel Discussion (Misc queries) | |||
delete duplicate names in a column | New Users to Excel |