Jump to content

VBA turn on/off certain layers


tinus94

Recommended Posts

Hi,

 

I want to put on and off layers in my drawing which contains the text "AL-" (So put off all the layers that are containing this text)

 

Yes I know, a simple Macro is much easier, but I want it in VBA8)

 

I'm working with a code based layer system. When I have this code, I can work them out for all codes.

 

By the way, it is for a toggle-button (green red). I already have this code:

 

 
Private Sub tgl_AL_Click()
If ActiveControl.Value = True Then
Me.ActiveControl.BackColor = &HFF&
Else
Me.ActiveControl.BackColor = &HC000&
End If
End Sub

 

Thanks already!!:roll:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...