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.
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.
"mamealemka" <mamealemka@discussions.microsoft.com> ha scritto nel messaggio
news:963CBA94-AB1F-4752-8F75-6EC2652F51B0@microsoft.com...
>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
Hi Thunder
Thanks.
"Thunder" wrote:
>
> "mamealemka" <mamealemka@discussions.microsoft.com> ha scritto nel messaggio
> news:963CBA94-AB1F-4752-8F75-6EC2652F51B0@microsoft.com...
> >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
>
>
>
Hi Thunder
Thanks.
"Thunder" wrote:
>
> "mamealemka" <mamealemka@discussions.microsoft.com> ha scritto nel messaggio
> news:963CBA94-AB1F-4752-8F75-6EC2652F51B0@microsoft.com...
> >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
>
>
>
Hi Thunder
Thanks.
"Thunder" wrote:
>
> "mamealemka" <mamealemka@discussions.microsoft.com> ha scritto nel messaggio
> news:963CBA94-AB1F-4752-8F75-6EC2652F51B0@microsoft.com...
> >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" <mamealemka@discussions.microsoft.com> ha scritto nel messaggio
news:C9F11660-207E-490E-B482-729B593F3281@microsoft.com...
> Hi Thunder
>
> Thanks.
>
Hi mamealemka,
You're Welcome, De Nada, De Rien, Di Nulla, ????????, ????, ?? ???????
;-)
tHUNDER
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks