Ok, I don't know what to do now. I am creating a TextEditor (because I saw it in another post ;P). Anyway, I have created the main form, but when the program starts it displays another form called newDlg.cs It has buttons on, with labels saying "Create a Text File:" or "Create a CSV File:" etc. When the button is clicked, it opens the main form and assigns a variable called fileFormat to 1 or 2 (for Text File and CSV respectively). The fileFormat variable is then used to determine whether the file can be saved as a .txt or a .csv when the user clicks Save. I need to somehow make fileFormat global because it is used in newDlg.cs and Main.cs I tried the method of creating a globalVars.cs class but that didn't work. Anyone got any idea? Thanks.