Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / March 2006

Tip: Looking for answers? Try searching our database.

Create buttom that saves current file in a given filename (Excel)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mamealemka - 17 Mar 2006 08:52 GMT
I want the user to save a protected worksheet by clicking on an action
buttom. The file should be saved with another file name taken from a cell in
the worksheet.
Thunder - 17 Mar 2006 09:24 GMT
>I want the user to save a protected worksheet by clicking on an action
> buttom. The file should be saved with another file name taken from a cell
> in
> the worksheet.

Hi,

try the following code:

Private Sub CommandButton1_Click()
Const MyPath = "C:\"

With ThisWorkbook
   .SaveAs Filename:=MyPath & Cells(1, 2).Value & ".xls" '<===Cell B1 =>
Change
End With

End Sub

This code does not make a control on the path of your folder.

Thunder
mamealemka - 17 Mar 2006 10:46 GMT
Hi Thunder

Thanks.

> >I want the user to save a protected worksheet by clicking on an action
> > buttom. The file should be saved with another file name taken from a cell
[quoted text clipped - 18 lines]
>
> Thunder
Thunder - 17 Mar 2006 13:02 GMT
> Hi Thunder
>
> Thanks.

Hi mamealemka,

You're Welcome, De Nada, De Rien, Di Nulla, ????????, ????, ?? ???????

;-)

tHUNDER
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.