private void saveAsToolStripMenuItem_Click(object sender, EventArgs e)
{
SaveFileDialog SaveAs = new SaveFileDialog();
SaveAs.Filter = "*.txt | *.txt"; // Only allows .xml formats to save to
SaveAs.Title = "Save Spreadsheet";
if (SaveAs.ShowDialog() == DialogResult.OK) // Prompts the user to enter a new file name
{
try
{
MainSave.Save(SaveAs.FileName, mainSS); // attempts to save the file
}
catch (Exception err)
{
MessageBox.Show(err.Message, "Error - Could not save to File", MessageBoxButtons.OK);
}
}
}