Avatar of Michael Noze
Michael Noze
 asked on

Save specific sheet to new workbook without opening - Excel

Hi Experts,

I'd like to know if there is a way to copy an Excel sheet to a new workbook without having to open it? My source file is a xlsm and when I run my macro, a pop-up keep appearing. Is there a solution to this?

Sub Sheet_SaveAs()

Dim wb As Workbook

Sheets("Output").Copy

Set wb = ActiveWorkbook

With wb
.SaveAs ThisWorkbook.Path & "\ - Recon_Output_ " & Format(Date, "yyyymmdd")
.Close False
End With

End Sub

Open in new window


Thank you.
pop-up.png
Microsoft AccessVBA

Avatar of undefined
Last Comment
Michael Noze

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Norie

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Michael Noze

ASKER
Hi,

That's perfect.

Thank you
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck