ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Saving info on form (https://www.excelbanter.com/excel-programming/338512-saving-info-form.html)

jlroper

Saving info on form
 

I am trying to put together a form that has a save button on it.
would like the save button to save the information in the text boxes i
a filename I specify. The code I'm working with is as follows:


Code
-------------------
Private Sub Save_Button_Click()

Application.DefaultSaveFormat = xlExcel2003Workbook
Do
fName = Application.GetSaveAsFilename
Loop Until fName < False
ActiveWorkbook.SaveAs Filename:=fName
ActiveWorkbook.Saved = True

End Su
-------------------


For some reason it is not actually saving the information with the for
though (it's just an empty form that is saved). Can someone help m
please (I'm pulling my hair out over here). :confused:

Thank you for any input.

jlrope

--
jlrope
-----------------------------------------------------------------------
jlroper's Profile: http://www.excelforum.com/member.php...fo&userid=2670
View this thread: http://www.excelforum.com/showthread.php?threadid=39971


Dave Peterson

Saving info on form
 
You may want to think about adding a worksheet (hidden) that you can use to
store all the stuff you want.

Then when you open the workbook (or load the form), you can retrieve values from
that hidden worksheet.



jlroper wrote:

I am trying to put together a form that has a save button on it. I
would like the save button to save the information in the text boxes in
a filename I specify. The code I'm working with is as follows:

Code:
--------------------
Private Sub Save_Button_Click()

Application.DefaultSaveFormat = xlExcel2003Workbook
Do
fName = Application.GetSaveAsFilename
Loop Until fName < False
ActiveWorkbook.SaveAs Filename:=fName
ActiveWorkbook.Saved = True

End Sub
--------------------

For some reason it is not actually saving the information with the form
though (it's just an empty form that is saved). Can someone help me
please (I'm pulling my hair out over here). :confused:

Thank you for any input.

jlroper

--
jlroper
------------------------------------------------------------------------
jlroper's Profile: http://www.excelforum.com/member.php...o&userid=26709
View this thread: http://www.excelforum.com/showthread...hreadid=399710


--

Dave Peterson


All times are GMT +1. The time now is 05:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com