C
chammock
I must be missing something with the terminology. I have a tool that
iterates through a form's controls and deletes them if they are command
buttons. Unfortunately, deleting a command button does not delete the
code that goes with them, such as click events like,
Private Sub vbacmdA1_Click()
MsgBox "Way cool!"
End Sub
I need to delete the click events and I know the form and the name of
the click event, since I created them programmatically. When I am
trying to iterate through click events, I consider those modules. But
when I try something like
For I = Modules.Count - 1 To 0 Step -1
to step through the click events, I end up getting the name of the
forms in my database back.
I have tried using Set cnt = db.Containers("Modules") and
For I = cnt.Documents.Count - 1 To 0 Step -1
to get to the code and it does something but not what I want.
I have tried using Documents.count , thinking that these may represent
the click event code, but cannot get there either.
So if anyone has the key to get to what I call code behind, please pass
it on. Thanks.
iterates through a form's controls and deletes them if they are command
buttons. Unfortunately, deleting a command button does not delete the
code that goes with them, such as click events like,
Private Sub vbacmdA1_Click()
MsgBox "Way cool!"
End Sub
I need to delete the click events and I know the form and the name of
the click event, since I created them programmatically. When I am
trying to iterate through click events, I consider those modules. But
when I try something like
For I = Modules.Count - 1 To 0 Step -1
to step through the click events, I end up getting the name of the
forms in my database back.
I have tried using Set cnt = db.Containers("Modules") and
For I = cnt.Documents.Count - 1 To 0 Step -1
to get to the code and it does something but not what I want.
I have tried using Documents.count , thinking that these may represent
the click event code, but cannot get there either.
So if anyone has the key to get to what I call code behind, please pass
it on. Thanks.