PC Review


Reply
Thread Tools Rate Thread

A Button that saves a workbook in the background

 
 
=?Utf-8?B?eWFzc2Vy?=
Guest
Posts: n/a
 
      2nd Oct 2006
Hello,

I want to create a button in an Excel Spreadsheet that will allow user users
to save the existing workbook in a specific directory (ie. C:\Census\"Value
from Cell A1".xls). Additionally, I would also like to have the file name to
be the sameas the text in cell A1 (CurrentFile) and when the button is
clicked, the user should not see the "SAVE AS" dialogue box or the dialogue
that says, "Do you want to replace the existing file?" dialogue.
Can someone please give me the VBA code that I need in order to execute the
above mentioned event?

Thanks,

Yasser
 
Reply With Quote
 
 
 
 
=?Utf-8?B?QWxvaw==?=
Guest
Posts: n/a
 
      2nd Oct 2006
Hi
Use the following Sub

Sub SaveWithNameInA1()
Application.DisplayAlerts = False
ThisWorkbook.SaveAs "C:\Census\" & Sheet1.Cells(1, 1).Value & ".xls"
Application.DisplayAlerts = True
End Sub

and attach it to the button.


"yasser" wrote:

> Hello,
>
> I want to create a button in an Excel Spreadsheet that will allow user users
> to save the existing workbook in a specific directory (ie. C:\Census\"Value
> from Cell A1".xls). Additionally, I would also like to have the file name to
> be the sameas the text in cell A1 (CurrentFile) and when the button is
> clicked, the user should not see the "SAVE AS" dialogue box or the dialogue
> that says, "Do you want to replace the existing file?" dialogue.
> Can someone please give me the VBA code that I need in order to execute the
> above mentioned event?
>
> Thanks,
>
> Yasser

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
When saving a jpeg in ppt, it saves with a black background, why? Theresa L. Microsoft Powerpoint 1 27th May 2009 08:23 PM
Excel saves my workbook as another workbook that was open at the t =?Utf-8?B?RGFuY2VzIHdpdGggRGF0YWJhc2Vz?= Microsoft Excel Crashes 0 11th Jul 2007 04:10 AM
Excel workbook is corrupted, workbook automatically saves on start =?Utf-8?B?UGF1bCBHb29kYQ==?= Microsoft Excel Misc 3 28th Sep 2006 04:51 PM
Macro that saves excel workbook as PDF?? =?Utf-8?B?bXlkb2dwZWFudXQ=?= Microsoft Excel Misc 1 25th May 2006 08:56 PM
Allow background saves - integration issues =?Utf-8?B?S2ltbWk=?= Microsoft Word Document Management 0 6th Apr 2006 03:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:46 PM.