+ Reply to Thread
Results 1 to 6 of 6

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

  1. #1
    mamealemka
    Guest

    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. #2
    Thunder
    Guest

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


    "mamealemka" <[email protected]> ha scritto nel messaggio
    news:[email protected]...
    >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. #3
    mamealemka
    Guest

    Re: Create buttom that saves current file in a given filename (Exc

    Hi Thunder

    Thanks.

    "Thunder" wrote:

    >
    > "mamealemka" <[email protected]> ha scritto nel messaggio
    > news:[email protected]...
    > >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. #4
    mamealemka
    Guest

    Re: Create buttom that saves current file in a given filename (Exc

    Hi Thunder

    Thanks.

    "Thunder" wrote:

    >
    > "mamealemka" <[email protected]> ha scritto nel messaggio
    > news:[email protected]...
    > >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
    >
    >
    >


  5. #5
    mamealemka
    Guest

    Re: Create buttom that saves current file in a given filename (Exc

    Hi Thunder

    Thanks.

    "Thunder" wrote:

    >
    > "mamealemka" <[email protected]> ha scritto nel messaggio
    > news:[email protected]...
    > >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
    >
    >
    >


  6. #6
    Thunder
    Guest

    Re: Create buttom that saves current file in a given filename (Exc


    "mamealemka" <[email protected]> ha scritto nel messaggio
    news:[email protected]...
    > Hi Thunder
    >
    > Thanks.
    >


    Hi mamealemka,

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

    ;-)

    tHUNDER



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1