Saving a spreadsheet using userform command buttons
Posted by J Tompson on August 15, 2001 4:06 AM
Hi,
I would like to save a workbook using a button on a user form. The catch is i want to save it with out being promted and with out the macros attached. I would also like to use a cell's contents to act as the file name.
I'm using excel 97 which seems to cause a lot of problems but any hel;p would be greatly appreciated.
I was given this code but it doesn't seem to work...
Private sub Commandbutton1_click()
Dim Fs as string
Fs = application.getsaveasfilename(textbox2.value, filefilter:= "Microsoft Excel File (*.xls), *.xls")
If Fs = "False" Then exit sub
Thisworkbook.saveas Fs
End sub
Cheers,
John