Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a Userform that I submit data to. The data can also repopulate
the userform using a Lookup button. What i'd like to make is a button on the userform that saves the entire workbook. I was hoping it would be as easy as creating a commandbutton and creating a "save" macro but it doesn't work. When I hit the save button and then close the entire workbook my data is not there. So my question. Can you create a button that will save the workbook without having to exit to the spreadsheet and hitting save there? Any help is appreciated. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Never Mind. I figured it out. I was not saving the code under the
correct private sub. I was just having a brain fart. Here's what I ended up using. Private Sub CommandButton1_Click() ActiveWorkbook.save End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
The question is, the Userform in workbook you want to save? Then you can use this: ThisWorkbook.Save otherwise you have to reference to the workbook by name, Workbooks("MyBook.xls").Save Hopes this helps. --- Per On 12 Jun., 15:59, Morlin wrote: I have a Userform that I submit data to. *The data can also repopulate the userform using a Lookup button. *What i'd like to make is a button on the userform that saves the entire workbook. *I was hoping it would be as easy as creating a commandbutton and creating a "save" macro but it doesn't work. *When I hit the save button and then close the entire workbook my data is not there. So my question. *Can you create a button that will save the workbook without having to exit to the spreadsheet and hitting save there? Any help is appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hi Mr. Ogilvy how to Ctl+s to save workbook from Active UserForm | Excel Programming | |||
Comman Button to Save Worksheet as Workbook | Excel Discussion (Misc queries) | |||
Save workbook via Command Button???? | Excel Programming | |||
Create a button to Save As the workbook | Excel Programming | |||
Command Button to Save As Workbook... | Excel Programming |