Dear Dioni,

Tanpa melihat bentuk, letak, dimensi dan isi tabelnya di Sheet; dan hanya
diperlihatkan POTONGAN makronya saja, tidak mudah bagi seseorang untuk
memahaminya, apalagi memperbaiki bugs atau pun ketidak cocokan makro dengan
tabelnya.

Jika mas Dioni berkenan melampirkan workbooknya, atau  (jika seandainya
makro tsb bukan karya sendiri, menunjuk suatu link dimana workbook tsb
diambil, mungkin ada members yg dapat memberi saran-saran..

Best regards,
o'Seno




Dioni wrote:
> 
> Pagi semua.
> Saya mendapatkan kesulitan untuk menggabungkan sheet. Mohon bantuannya ya.
> 
> If Left(W.Name, 4) <> "comb" Then
>          Set MoveTbl = W.Cells(6).CurrentRegion.Offset(6, 0)
>          Set MoveTbl = MoveTbl.Resize(MoveTbl.Rows.Count - 1,
> MoveTbl.Columns.Count)
>          tRows = MoveTbl.Rows.Count
>          Urutan = Urutan & W.Name & vbTab & vbTab & tRows & vbCrLf
>          MoveTbl.Copy Destination:=DestRange
>          Set DestRange = DestRange.Offset(tRows, 0)
> 
> Arti dari Set MoveTbl = MoveTbl.Resize(MoveTbl.Rows.Count - 1
> apa ya?tabel yang akan saya copy mulai dari A7, jadi Set MoveTbl =
> W.Cells(6).CurrentRegion.Offset(6, 0)
> Dengan code diatas yang tercopy cuma 1 baris A7 aja dari 12 sheet
> 
> Melihat contoh :
> Sub GabungTabelSheet()
>    
>    Dim W As Worksheet, Urutan As String
>    Dim MoveTbl As Range, DestRange As Range
>    Dim N As Long, tRows As Long
>    Const msg As String = "Penggabungan Selesai." & vbCrLf & vbCrLf & _
>                          "SheetName: | RowsCount:" & vbCrLf
>    Set DestRange = Sheets("combine").Range("A2")
>    N = 0
>    For Each W In Worksheets
>       If Left(W.Name, 4) <> "comb" Then
>          Set MoveTbl = W.Cells(1).CurrentRegion.Offset(1, 0)
>          Set MoveTbl = MoveTbl.Resize(MoveTbl.Rows.Count - 1,
> MoveTbl.Columns.Count)
>          tRows = MoveTbl.Rows.Count
>          Urutan = Urutan & W.Name & vbTab & vbTab & tRows & vbCrLf
>          MoveTbl.Copy Destination:=DestRange
>          Set DestRange = DestRange.Offset(tRows, 0)
>          N = N + CLng(tRows)
>        End If
>    Next W
>    Application.CutCopyMode = False
>    MsgBox msg & Urutan & "Total Rows digabung:  " & N, vbInformation,
> "LAPORAN...:"
> End Sub
> 
> contoh ini pas di run macronya smua tercopy dan jika saya tambah 1 baris
> dan saya run ulang baris itu jg ikut tercopy.
> Mohon bantuannya ya?
> Terima Kasih
> Dioni
> 


--
View this message in context: 
http://milis-belajar-excel.1048464.n5.nabble.com/belajar-excel-Menggabungkan-sheet-tp4790476p4790549.html
Sent from the Milis Belajar Excel mailing list archive at Nabble.com.

Kirim email ke