شنبه, ۱۶ مرداد ۱۳۹۵، ۰۴:۰۲ ب.ظ
ایجاد خودکار برگه در اکسل
Sub main()
Dim i As Integer
Dim name As String
i = 1
Do While i < 4
Sheets("sheet1").Select
name = Cells(i, 1).Value
Call CreateSheet(name)
i = i + 1
Loop
End Sub
Private Sub CreateSheet(name1)
Dim ws As Worksheet
With ThisWorkbook
Set ws = .Sheets.Add(After:=.Sheets(.Sheets.Count))
ws.name = name1
End With
End Sub