建立工作表叫"彙總" A1 單元格寫模板工作表名稱(宏複製表作每表)A3 單元格寫"工作表名稱", A4 單元格寫每表格期單元格位置 A1. A4 協商要建立表格名稱期能空行(圖)程式粘 Visual Basic 模組:Sub Procedure() Application.ScreenUpdating = False TemplateName = Sheets("彙總").[A1] UpdateRange = Sheets("彙總").[B3] RowNo = 4 TabName = Sheets("彙總").Cells(RowNo, 1) Do While TabName <> "" Sheets(TemplateName).Copy After:=Sheets(Sheets.Count) ActiveSheet.Name = TabName Range(UpdateRange) = Sheets("彙總").Cells(RowNo, 2) RowNo = RowNo + 1 TabName = Sheets("彙總").Cells(RowNo, 1) Loop Sheets("彙總").Select Application.ScreenUpdating = TrueEnd Sub按 Alt + F8 執行 Procedure 圖"class="ikqb_img_alink">
建立工作表叫"彙總" A1 單元格寫模板工作表名稱(宏複製表作每表)A3 單元格寫"工作表名稱", A4 單元格寫每表格期單元格位置 A1. A4 協商要建立表格名稱期能空行(圖)程式粘 Visual Basic 模組:Sub Procedure() Application.ScreenUpdating = False TemplateName = Sheets("彙總").[A1] UpdateRange = Sheets("彙總").[B3] RowNo = 4 TabName = Sheets("彙總").Cells(RowNo, 1) Do While TabName <> "" Sheets(TemplateName).Copy After:=Sheets(Sheets.Count) ActiveSheet.Name = TabName Range(UpdateRange) = Sheets("彙總").Cells(RowNo, 2) RowNo = RowNo + 1 TabName = Sheets("彙總").Cells(RowNo, 1) Loop Sheets("彙總").Select Application.ScreenUpdating = TrueEnd Sub按 Alt + F8 執行 Procedure 圖"class="ikqb_img_alink">