SaveAs

KeythStone

New Member
Joined
Mar 30, 2011
Messages
36
Hello,


Trying to get this code right but I keep getting Object required error.


Sheets("card").Select
ActiveWorkbook.SaveAs Filename:= _
"\\thunderbolt\Departments\Operations\AR Management\Audit\Centricity Audits\Copy of Audits\Audit_" & Active.Range("B5") & "_" & Active.Range("B6") & Format(Date, "mm_dd_yyyy") & ".xlsx"


Where "B5" refers to a name in Sheets("card").Select, "B6" to a Database.

Thanks for your help,

Stay Smooth,
KeythStone
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Try

Code:
ActiveWorkbook.SaveAs Filename:= _
"\\thunderbolt\Departments\Operations\AR Management\Audit\Centricity Audits\Copy of Audits\Audit_" & Sheets("card").Range("B5") & "_" & Sheets("card").Range("B6") & Format(Date, "mm_dd_yyyy") & ".xlsx"
 
Upvote 0
Hello,


Trying to get this code right but I keep getting Object required error.


Sheets("card").Select
ActiveWorkbook.SaveAs Filename:= _
"\\thunderbolt\Departments\Operations\AR Management\Audit\Centricity Audits\Copy of Audits\Audit_" & Active.Range("B5") & "_" & Active.Range("B6") & Format(Date, "mm_dd_yyyy") & ".xlsx"


Where "B5" refers to a name in Sheets("card").Select, "B6" to a Database.

Thanks for your help,

Stay Smooth,
KeythStone

B5's part should read

"\\thunderbolt\Departments\Operations\AR Management\Audit\Centricity Audits\Copy of Audits\Audit_" & worksheets("card").Range("B5") & "_" & Active.Range("B6") & Format(Date, "mm_dd_yyyy") & ".xlsx"

No idea on B6's part. You say "database" which makes no sense on the surface. Is it or isn't it a cell on a worksheet and if so, which sheet?
 
Upvote 0
Thanks for the help,

It's true, my syntax was a bit sloppy. Once all cleaned it run perfectly.

Stay Smooth,
KeythStone
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,275
Members
452,902
Latest member
Knuddeluff

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