View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Doug Glancy Doug Glancy is offline
external usenet poster
 
Posts: 770
Default stupid cryptic messages

Set is only used for objects, hence the message. Change to:

cntr = ActiveWorkbook.Names.Count

hth,

Doug

"Jonathan Cooper" wrote in
message ...
can someone explain to me why this isn't working and what the error
message

compile error: Object required.

Sub tester()
Dim cntr As Integer
Set cntr = ActiveWorkbook.Names.Count

End Sub