Save As, From Multiple Cells on Another Sheet Via (dialogsaveas)

micksid

New Member
Joined
Jun 7, 2011
Messages
11
Hello

Im new to the forum so go easy on me :)


I have probably whats a very simple question, but i have spent hours researching, modifying code and still cant get it to do exactly what i need.

I basically have a front sheet which has a few macro buttons and then 3 other data entry sheets/reports.

on my front screen i have a "Save Report" button, once the user presses that button i want the "save as" dialog box window to come up so they can pick there own save location, but i want the file name to be what ever is cells (C15) and (H15) followed by todays date which is on another sheet called "Data_Entry"

so far i have only got to this, this fetches up the dialog box which i want with todays date in the file name, but i need to change the ActiveCell.Value bit.

Sub DoSave()
Application.Dialogs(xlDialogSaveAs).Show "C:\Temp\" & ActiveCell.Value & " - " & Format(Date, "ddmmyyyy") & ".xls"
End Sub

Hope someone can help me asap.

thanks

Mick
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Try

Code:
Sub DoSave()
Application.Dialogs(xlDialogSaveAs).Show "C:\Temp\" & Range("C15").Value & Range("H15").Value & " - " & Format(Date, "ddmmyyyy") & ".xls"
End Sub
 
Upvote 0
thanks for the rapid responce.

Not copied you code over yet, didnt expect a reply that quick, just a quick question about you code,

the button i press to activate the "save as" macro is on the 1st sheet, but the cells i specified above are on the 2nd sheet.

will your code still pull the data from the other sheet?

sorry if im being thick


do i need to enter = sheets.("Sheet2").Range ("C15") or something on the lines of that
 
Last edited:
Upvote 0
No me thick I think. Try

Code:
Sub DoSave()
Application.Dialogs(xlDialogSaveAs).Show "C:\Temp\" & Sheets("Data Entry").Range("C15").Value & Sheets("Data Entry").Range("H15").Value & " - " & Format(Date, "ddmmyyyy") & ".xls"
End Sub
 
Upvote 0
No me thick I think. Try

Code:
Sub DoSave()
Application.Dialogs(xlDialogSaveAs).Show "C:\Temp\" & Sheets("Data Entry").Range("C15").Value & Sheets("Data Entry").Range("H15").Value & " - " & Format(Date, "ddmmyyyy") & ".xls"
End Sub


YOU ARE A SUPERSTAR!!!!

worked a treat, can i trade you for a bag of haribo :)

Thanks for your time. think its time i started to learn the basics
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,304
Members
452,904
Latest member
CodeMasterX

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