How to copy sheets to another workbook using vba?

后端 未结 10 1837
故里飘歌
故里飘歌 2020-11-27 17:52

So, what I want to do, generally, is make a copy of a workbook. However, the source workbook is running my macros, and I want it to make an identical copy of itself, but wit

10条回答
  •  醉梦人生
    2020-11-27 17:59

    Try this instead.

    Dim ws As Worksheet
    For Each ws In ActiveWorkbook.Worksheets
        ws.Copy
    Next
    

提交回复
热议问题