I know that title is kinda miss leading, but i couldnt figure out another way to explain it. I know theres a way, but I dont know how to do it.

Ive got a Save code that I have about 5 differnet times in my application. How do I make it so that I can just type in something like Do Save, and it locates the save code and follows it through, then returns to where it was.

Would save me around 50 lines of code if someone could help me out.

Thanks

Recommended Answers

All 3 Replies

Member Avatar for Unhnd_Exception

Create a Save Sub

Public Sub Save()
       '.......your save code
End Sub

public sub btnSave_Click(byval sender as object, byval e a eventargs) handles btnsave.click
   Save()
end sub

My saviour once again.

Could I also use a background worker?

Member Avatar for Unhnd_Exception

Background Worker? Start a new thread for that 1.

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.