View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default "Private Sub" v "Sub"

Well, there is something definitely quirky with this workbook. I have
procedures that run just fine with undeclared variables in an "Option
Explicit" module, providing that those variables are declared elsewhere
*Inside* other procedures in the same module. (They are defiantly not
declared at the module level!) Now here is the wacky bit. The procedures
work fine as "Sub" if I make that Sub into "Private Sub" Then the

procedure
stops working and asks me to declare!

It would appear that this anomaly is only aparent in this workbook, as I

am
unable to repeat it in other workbooks!


I can neither recreate nor explain your anomaly, maybe someone else can.

It doesn't sound right, perhaps rebuild a new wb or try Rob Bovey's
CodeCleaner:

http://www.appspro.com/Utilities/CodeCleaner.htm

Patrick - thanks for clarifying what I "meant" to explain but didn't quite!

Regards,
Peter T