Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Jun 3, 7:25 am, "Rob Bovey" wrote:
wrote in message ... Thanks for the solution to fix the code. Now the question is, how can one test if a member of the sheet colleciton is an old vbacodemodule? Do you just do a test on type with an on error continue and test the err.description or is there a better way? Hi Carl, Assuming you're looping the sheets in something like the following manner, you can use the TypeName function to check for modules. The only time the type name "Module" will ever appear is if you've got an Excel 5/95 code module in the Sheets collection. Dim objSheet As Object For Each objSheet In ActiveWorkbook.Sheets If TypeName(objSheet) = "Module" Then MsgBox objSheet.Name & " is a legacy code module." End If Next objSheet -- Rob Bovey, Excel MVP Application Professionalshttp://www.appspro.com/ * Take your Excel development skills to the next level. * Professional Excel Developmenthttp://www.appspro.com/Books/Books.htm Rob, Thanks a million, just what I needed! Carl |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
User-defined type collection in class module | Excel Programming | |||
code in module A to not execute a Worksheet_SelectionChange sub of another module | Excel Discussion (Misc queries) | |||
Run worksheet module code from workbook module? | Excel Programming | |||
creating a collection of Sheets references | Excel Programming | |||
collection of sheets | Excel Programming |