Untuk bisa ke multi workbook juga mirip dengan ke multi sheet. Loop workbook diletakkan paling luar. Biasanya ada bagian yang tugasnya buka workbook atau bikin workbook baru. Yang sheet kemarin kan juga bisa ditambahkan untuk buat sheet baru kalau belum ada.
Pokoke, kembangkan saja secara berlanjut sampai dikira-kira final nanti dikirim ke saya untuk di upload ke folder milis. Wassalam, Kid. On Wed, Aug 28, 2013 at 7:09 AM, De Premor <[email protected]> wrote: > ** > > > Oh tiga dimensinya begitu ya, saya pikir seperti > array(mendatar,tegak,kedalaman), dan bisa sekali lempar ke workbook > seperti yang terjadi pada array 2D > > Terima kasih ilmunya Mr. Kid > > > On 28-08-2013 0:18, Mr. Kid wrote: > > > eh lupa, > baris : > ReDim Data(1 To Baris, 1 To Kolom) > > jadi : > ReDim Data(1 To Baris, 1 To Kolom) as long > > > > 2013/8/28 Mr. Kid <[email protected]> > >> 3D maksudnya dengan sheet ? >> >> misal ada 3 sheet >> >> Sub tes3d() >> Dim Data() as long, Kolom As Long, Baris As Long, tStart As Double >> Dim i As Long, j As Long, Counter As Variant, lSht as long >> >> >> Kolom = InputBox("Mau Sampai Berapa Kolom ?", "Nulis") >> Baris = InputBox("Mau Sampai Berapa Baris ?", "Nulis") >> >> If Not WorksheetFunction.IsNumber(Kolom) Or Not >> WorksheetFunction.IsNumber(Baris) Then Exit Sub >> ReDim Data(1 To Baris, 1 To Kolom) >> >> tStart = Timer >> for lsht=1 to 3 >> For i = 1 To Baris >> For j = 1 To Kolom >> Counter = Counter + 1 >> Data(i, j) = Counter >> Next j >> Next i >> sheets(lsht).Range("A1").CurrentRegion.ClearContents >> sheets(lsht).Range("A1").resize(Baris, Kolom).value = Data >> next lsht >> MsgBox Timer - tStart & " detik" >> End Sub >> >> >> misal ada 3 sheet dan ndak urut, tapi nama-namanya sudah diketahui : >> Sub tes3d() >> Dim Data() as long, Kolom As Long, Baris As Long, tStart As Double >> Dim i As Long, j As Long, Counter As Variant, vSht as variant >> >> >> Kolom = InputBox("Mau Sampai Berapa Kolom ?", "Nulis") >> Baris = InputBox("Mau Sampai Berapa Baris ?", "Nulis") >> >> If Not WorksheetFunction.IsNumber(Kolom) Or Not >> WorksheetFunction.IsNumber(Baris) Then Exit Sub >> ReDim Data(1 To Baris, 1 To Kolom) >> >> tStart = Timer >> for each vsht in >> array("sheet1","sheet5","sheetEmbuh","satsitsatsit") >> For i = 1 To Baris >> For j = 1 To Kolom >> Counter = Counter + 1 >> Data(i, j) = Counter >> Next j >> Next i >> sheets(vsht).Range("A1").CurrentRegion.ClearContents >> sheets(vsht).Range("A1").resize(Baris, Kolom).value = Data >> next vsht >> MsgBox Timer - tStart & " detik" >> End Sub >> >> ;) >> >> Wassalam, >> Kid. >> >> >> >> >> 2013/8/27 De Premor <[email protected]> >> >>> >>> >>> iya nih, keren :D >>> >>> Kalau untuk yang 3D kira2 gimana ya Mr. Kid ? >>> >>> >>> On 27-08-2013 22:59, Mr. Kid wrote: >>> >>> >>> baris : >>> Range("A1", Range("A1").Offset(Baris - 1, Kolom - 1).Address) = Data >>> >>> sepertinya bisa : >>> Range("a1").resize(baris,kolom).value=data >>> >>> Wassalam, >>> Kid. >>> >>> >>> >>> 2013/8/27 De Premor <[email protected]> >>> >>>> Range("A1", Range("A1").Offset(Baris - 1, Kolom - 1).Address) = Data >>> >>> >>> >>> >>> >> > > >

