Akhirnya tercapai juga 3 dimensinya... padahal waktu ngomong 3 dimensi saya juga belum tahu dimensi ke 3 nya apa ... ha ha ha
Salam,
HK
----- Forwarded Message -----
From: Jan Raisin <[email protected]>
To: [email protected]
Sent: Tuesday, 27 August 2013, 18:32
Subject: Re: Fw: [belajar-excel] Tes Looping For ... Next dan For each ... Next
From: Jan Raisin <[email protected]>
To: [email protected]
Sent: Tuesday, 27 August 2013, 18:32
Subject: Re: Fw: [belajar-excel] Tes Looping For ... Next dan For each ... Next
السَّلاَمُ عَلَيْكُمْ وَرَحْمَةُ اللهِ وَبَرَكَاتُهُ
mr Kid,
kodenya mantap.. memberikan pencerahan untuk Jan,
selama ini masih bingung gimana caranya memindahkan dimensi ketiga ke setiap sheet yang berbeda 

ternyata dimensi ketiganya ditaruh di loop yang paling luar xixixixi ^_^
وَسَّلاَمُ عَلَيْكُمْ وَرَحْمَةُ اللهِ وَبَرَكَاتُهُ
-Miss Jan Raisin-
2013/8/28 Mr. Kid <[email protected]>
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]>for lsht=1 to 3misal ada 3 sheet3D maksudnya dengan 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 = TimerFor i = 1 To BarisNext j
For j = 1 To Kolom
Counter = Counter + 1
Data(i, j) = Counter
Next i
sheets(lsht).Range("A1").CurrentRegion.ClearContents
sheets(lsht).Range("A1").resize(Baris, Kolom).value = Data
next lshtMsgBox 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 variantfor each vsht in array("sheet1","sheet5","sheetEmbuh","satsitsatsit")
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 i = 1 To BarisNext j
For j = 1 To Kolom
Counter = Counter + 1
Data(i, j) = Counter
Next i
sheets(vsht).Range("A1").CurrentRegion.ClearContents
sheets(vsht).Range("A1").resize(Baris, Kolom).value = Data
next vshtMsgBox Timer - tStart & " detik";)
End SubWassalam,Kid.

