Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Save workbook button on Userform

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Save workbook button on Userform

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default Save workbook button on Userform

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hi Mr. Ogilvy how to Ctl+s to save workbook from Active UserForm [email protected] Excel Programming 4 July 31st 06 04:45 PM
Comman Button to Save Worksheet as Workbook tmstreet Excel Discussion (Misc queries) 2 July 17th 06 05:44 PM
Save workbook via Command Button???? Chris Watson[_5_] Excel Programming 3 March 23rd 06 10:11 AM
Create a button to Save As the workbook Helen Excel Programming 5 November 24th 05 06:21 AM
Command Button to Save As Workbook... RPIJG[_13_] Excel Programming 1 May 12th 04 08:59 PM


All times are GMT +1. The time now is 03:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"