Message 1 of 14
Select Case basics!
Not applicable
10-28-2005
04:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I'm tring to have a dabble with VBA! I'm wanting to create a form with buttons that will change various layer properties. Having a few problems with the Select Case syntax......i'd be extremely helpful if someone could point me in the right direction. (I'm currently getting the error 'Object doesn't support this property or method (Error 438)'). So I believe there's something wrong with my dimensioning?
Many thanks,
Dom
*********************************
Private Sub cmdLayerState1_Click()
Dim objLayer As AcadLayer
For Each objLayer In ThisDrawing.Layers
Select Case objLayer
Case "layer1*"
objLayer.LayerOn = False
Case "layer222"
objLayer.Plottable = False
Case "layer333"
objLayer.Freeze = True
End Select
Next
Application.Update
End Sub
***********************************
I'm tring to have a dabble with VBA! I'm wanting to create a form with buttons that will change various layer properties. Having a few problems with the Select Case syntax......i'd be extremely helpful if someone could point me in the right direction. (I'm currently getting the error 'Object doesn't support this property or method (Error 438)'). So I believe there's something wrong with my dimensioning?
Many thanks,
Dom
*********************************
Private Sub cmdLayerState1_Click()
Dim objLayer As AcadLayer
For Each objLayer In ThisDrawing.Layers
Select Case objLayer
Case "layer1*"
objLayer.LayerOn = False
Case "layer222"
objLayer.Plottable = False
Case "layer333"
objLayer.Freeze = True
End Select
Next
Application.Update
End Sub
***********************************