Save As help

JoeSalmi

Board Regular
Joined
Jan 31, 2011
Messages
128
Okay I need a little bit of help with this cause I just can't figure it out.

I am using this code to get my save as dialog to pop up which asks for a file name.

Code:
 With Application.Dialogs(xlDialogSaveAs).Show
       End With

But what I would like to have happen is the Save as box pop up with with this in the save as area:
Code:
ThisWorkbook.Name & "(" & Sheet1.Range("C4") & " " & Sheet1.Range("E4") & ")"

That way each week when the user saves the spreadsheet all they have to do is double check the name and click okay with out having to edit and type out another long name.

Can anyone help me out?
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Have you considered just automatically saving the file as the desired filename, instead of using a popup dialogue?
 
Upvote 0
Have you considered just automatically saving the file as the desired filename, instead of using a popup dialogue?

I have but the short version of the story is the use clicks a button which runs a macro and at the end of the macro it automatically saves the ss with the new name. Everytime the user enters a new week the ss will be saved with the new name.

I'm attempting to automate just about everything I can.
 
Upvote 0
I don't understand, are you saying you've encountered problems with skipping the dialogue popup and saving the new filename directly?

I was able to find this... it's about Access but should work with Excel. The person who answered makes it sound like it's sort of a trick getting a string into that text box.
 
Upvote 0
Hello,

Maybe:

<font face=Courier New>     Application.Dialogs(xlDialogSaveAs).Show (ThisWorkbook.Name & "(" & Sheet1.Range("C4") & " " & Sheet1.Range("E4") & ")")<br><SPAN style="color:#007F00">'</SPAN></FONT>
 
Upvote 0
Hello,

Maybe:

<font face=Courier New>**** Application.Dialogs(xlDialogSaveAs).Show (ThisWorkbook.Name & "(" & Sheet1.Range("C4") & " " & Sheet1.Range("E4") & ")")<br><SPAN style="color:#007F00">'</SPAN></FONT>


The Save As Dialog box pops up but the filename area is blank.
 
Upvote 0
I don't understand, are you saying you've encountered problems with skipping the dialogue popup and saving the new filename directly?

I was able to find this... it's about Access but should work with Excel. The person who answered makes it sound like it's sort of a trick getting a string into that text box.


WOW that seems VERY complicated hahaha I'll hold on to it but I know there is an easier way. I'm actually pretty close but it seems that I may have to strip the file extension off the name before it attempts to save it.
 
Upvote 0
I am still trying...I think it may need to be a string somehow??

You can see this comes up as "Hello"
<font face=Courier New>   Application.Dialogs(xlDialogSaveAs).Show ("Hello")</FONT>
 
Upvote 0
<font face=Courier New><SPAN style="color:#00007F">Sub</SPAN> SavinOK()<br><br><SPAN style="color:#00007F">Dim</SPAN> v <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">String</SPAN><br><br>v = ThisWorkbook.Name & "(" & Sheet1.Range("C4") & " " & Sheet1.Range("E4") & ")"<br><br>   Application.Dialogs(xlDialogSaveAs).Show (v)<br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>
 
Upvote 0

Forum statistics

Threads
1,224,567
Messages
6,179,568
Members
452,926
Latest member
rows and columns

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