View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Module Precedence?

Purely unscientific...

I think that there is some overlap between where excel stores its names and
UDF/Subroutine names.

If you create a new workbook and then add a couple of routines to its project:

Option Explicit
Sub aaaaa()
MsgBox "hi"
End Sub
Function bbbbb()
MsgBox "Bye"
End Function

Then back to excel.

Edit|goto|type in
aaaaa
and watch were you end up.

Try the same with bbbbb.

Excel doesn't keep good enough track when you remove the function. But if you
create the name and then delete it, excel's memory is refreshed.

====
If you've ever used the same name for a procedure, module, or workbook Name,
you'll see lots of weird things happening.




SB wrote:

Thanks Dave, worked perfectly - now can someone explain why?

Regards

scott


--

Dave Peterson