Hi all, This is my first post on this forum, but I am a long time fan of this site. I would like to thank all those who offer help, especially to noobs like myself. Now on to my question. I have a program in VB.NET with the option to open two different files, one is an excel and the other is notepad. Each contain relevant information that is extracted using various user selections via buttons. What I want is to use the same buttons for both file formats, though the actual coding of what the button does for each differs. The two files are not opened at the same time. For now I am trying to set it up where, if you open an excel then the coding on the button only works for the excel and vice versa with notepad. Can anyone give me some help regarding this? Thanks.