Help with Save Macro

maxx_daddy

Board Regular
Joined
Dec 3, 2010
Messages
74
Hi,
So this works on one sheet but not on another?? What i am trying to accomplish is: i open a sheet, import a bunch of data, modifty it slightly, then save it based on a concantenanted cells value (work order # quote # customer name and a job title).
It works for my sales reports but not for this. I do have it attached to a command button, whereas my other one is just part of a macro.
Help!!


Private Sub CommandButton2_Click()
Run "saver"
End Sub
------------------------------------------------
Sub saver()
ThisFile = Range("w53").Value
ActiveWorkbook.SaveAs Filename:=ThisFile
End Sub

Thanks,
Joe (Maxx's Daddy)
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
You would use the word Call so your macro would be

Private Sub commandbutton_click()
Call Saver
End Sub
 
Upvote 0
I get a run time error 1004.
I took the file address from my server where i intend to save this.
here is my concantenated cell value.
=CONCATENATE("\\rdc-vsvr-01\1.1 Shared Files\6 - SALES & MARKETING, Price Lists, Flyers, Networking, Trade Shows\JOB SHEETS FOR 2011\",(A11),("-"),(E11),("-"),(B6),("-"),(Sheet2!B6),(".xls"))
 
Upvote 0
if your using the cell ID then at the end it wont be (".xls")

In the code it would be something like this
ActiveWorkbook.SaveCopyAs Range("CellID") & ".xls"
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,762
Members
452,940
Latest member
rootytrip

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