Member Avatar for CriticalError

I am not sure if this is possible, in VB is it possible to link to some piece of code in the current document?

It isn't very clear what you are trying to do. Can you explain in more detail?

Member Avatar for CriticalError

I have a method this:

Private Sub Undo()
        Document.Undo()
    End Sub

Now in the event undo_click (aka menu bar > edit > undo click) I got this code:

Private Sub edit_Undo_Click(sender As System.Object, e As System.EventArgs) Handles edit_Undo.Click
        Undo()
    End Sub

It just refers back to the method Private Sub Undo()

Is it possible to link, to the method within a document?

So if i published this software, and someone clicked on Undo, it would be easier to have a link to the actual code which runs this.

I hope you understand now.

I must be totally lost, but didn't you answer you own question with the code you provided?

Are you trying to link code to an external document?

If so, just make the sub public and import the document on the document you wish to have the Undo.

If not, you have already linked the code in the current document.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.