Shadowsave help

Falakka

New Member
Joined
Jul 16, 2008
Messages
9
Hey guys,

Who can help me out on this one?

I have a date in B2. For example, you fill in 30-09-08, and it has the format to show "wednesday 30 September 2008"(I'm dutch....).

I have a button which prints out a range of cells, but I want the button to shadowsave the file as well. I recorded a macro to print it.

I have this map on my PC: c:\exceldocs\

If I click on the button, I want the file to be saved like this:
30-09-08 + now().xls

The file is being saved after midnight, so I want the file to be saved like this:
30-09-08 31-09-08 00:15.xls

Something like this:
value b2 + now()+ .xls

The value in b2 has the format which adds the name of the day, but if you save the file, I don't want to show the name of the day in the name of the file.

I'm hoping that someone could help me out on this.

Kind regards,

Falakka
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
You can't have a colon in a file name, but does this help you?

Code:
Sub Test()
    Dim FileName As String
    FileName = Format(Worksheets("Sheet1").Range("B2").Value, "dd-mm-yy")
    FileName = FileName & " " & Format(Date, "dd-mm-yy")
    FileName = FileName & " " & Format(Time, "hhmm") & ".xls"
    MsgBox FileName
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,728
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top