This is a heads-up to the folks here that installing Navisworks Manage 2010 appears to hose AutoCAD 2008's VBA support.
Once I installed Navisworks my VBA code started returning errors on any layout's Block object. Uninstalling Navisworks restores AutoCAD's VBA support.
Note that this issue does not occur with AutoCAD 2010. I have an active support case open with Autodesk.
Symptom in AutoCAD:
Running the following code in AutoCAD will result in an error once the code gets to For Each aObj statement.
Code:Sub Test() Dim aLayout As AcadLayout For Each aLayout In ThisDrawing.Layouts Dim aBlock As AcadBlock Set aBlock = aLayout.Block Debug.Print aBlock.Name & ": " & CStr(aBlock.Count) Dim aObj As AcadObject For Each aObj In aLayout.Block Debug.Print aObj.ObjectName Next aObj Next aLayout End Sub