Link to home
Start Free TrialLog in
Avatar of Jagwarman
Jagwarman

asked on

vba to clear out stuff in Name Manager Cont

I am using the below code to clear from Name manager. Seemed to work fine last week now I am getting Run Time Error

Sub test()
    Dim n As Name
    For Each n In Names
        n.Delete
    Next
End Sub

Run time error 1004

The name that you entered is not valid.
 Reasons for this can include:
 -The name does not begin with a letter or an underscore
 -The name contains a space or other invalid characters
 -The name conflicts with an Excel built-in name or the name of another object in the workbook.

Please assist to resolve
ASKER CERTIFIED SOLUTION
Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It would help if you could attach your workbook.