If I'm not mistaken that code is VB.NET!

Furthermore the code posted isn't doing any save into a file, it rather reads from a file and puts the contents into TextBox1!

And on your question, "How to use code from a Menu on aCommandButton, the answer is: The use is the same, you could copy/paste the code from one Sub to the other.