View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kay[_6_] Kay[_6_] is offline
external usenet poster
 
Posts: 5
Default How Can I Loop through all the range names in a workbook in VBA?

Hi, I am using Excel2002 SP3
I need to identify all the range names within a workbook

Any ideas? My below code does not work error message 'argument not
optional'

Dim ws As Worksheet
Dim rng As Range

For Each ws In ActiveWorkbook.Worksheets
For Each rng In ws.Range
Select Case rng.Name
Case "rangename"
do soemthing
Case Else
End Select
Next
Next