• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA code to workbook save copy

Hello Experts.

There is a new challenge at office.

I have list of countries in Sheet1 may be 50+ in "A" column.

This workbook consists of 42 worksheets out of which only 13 are visible.

When you click of a button need to look for country and save copy of this workbook with only visible worksheets and paste values and save in a folder.

Waiting for your Reply...

upload_2017-3-7_23-39-12.png

Cheers!
 
Hi !

SaveCopyAs to create new workbook.

Desactivate DisplayAlerts property during execution.

For Each loop to scan Worksheets collection,
if a sheet is hidden, Delete it …
 
Hello Marc .

Thanks for your quick solution.

Tried and efforts are in vein..Can i have the code.

Cheers!
 
Last edited by a moderator:

Hélas, the code depends on what you didn't explain
and on workbook so as we can't guess !

See forum rules as well the tip in frame just above
when you write a post or the same advice before to log in …

But you can easily start just using Macro recorder !
 
Hello James.

May be you are trying to say when you auto filter and no data found to copy visible cells?

As Marc said...Please upload a sample file to get a quick solution.
 
Last edited by a moderator:
Back
Top