Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
mamealemka
 
Posts: n/a
Default Create buttom that saves current file in a given filename (Excel)

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.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Thunder
 
Posts: n/a
Default Create buttom that saves current file in a given filename (Excel)


"mamealemka" ha scritto nel messaggio
...
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


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
mamealemka
 
Posts: n/a
Default Create buttom that saves current file in a given filename (Exc

Hi Thunder

Thanks.

"Thunder" wrote:


"mamealemka" ha scritto nel messaggio
...
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



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Thunder
 
Posts: n/a
Default Create buttom that saves current file in a given filename (Exc


"mamealemka" ha scritto nel messaggio
...
Hi Thunder

Thanks.


Hi mamealemka,

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

;-)

tHUNDER


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
Excel Outlook Attachments opening after several errors everytime cito_support Setting up and Configuration of Excel 2 March 13th 06 06:15 PM
when I save a file from Excel 2003 to cd it saves as read only mmjjmm Excel Worksheet Functions 1 February 14th 06 01:15 AM
Reflecting info between an excel file and a word one or two excel file. Starriol Excel Worksheet Functions 0 November 3rd 05 01:49 PM
Exporting excel to text file Exceluser Excel Discussion (Misc queries) 1 July 1st 05 03:04 AM
Excel How do I create a comma delineated xls file to a comma delineated. Mark Excel Discussion (Misc queries) 0 November 26th 04 10:28 PM


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

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"