Upload
mukh2
View
78
Download
11
Embed Size (px)
DESCRIPTION
Contoh Input data menggunakan Macro di Excell
Citation preview
Home (/) Articles News & Events (/news-events) Shop (/shop) LoginForum (/forum)
Klinik Excel - Input Data Di Excel dengan Macro - Macro & VBA - Forum http://klinikexcel.com/forum/item/5-macro-vba/150-input-data-di-excel-...
1 of 6 3/6/2014 2:09 AM
Nama = Me.Cells(2, 1).Value
Alamat = Me.Cells(2, 2).Value
With Worksheets("Database")
'Cari tau baris terakhir yang kosong pada sheet Database
BarisTerakhir = Worksheets("Database").Cells(.Rows.Count, 1).End(xlUp).Row
'Simpan data dari sheet Form ke sheet Database
'pada baris terakhir yang kosong
.Cells(BarisTerakhir + 1, 1).Value = Nama
.Cells(BarisTerakhir + 1, 2).Value = Alamat
End With
'hapus data inputan pada sheet Form
Me.Range(Cells(2, 1), Cells(2, 2)).ClearContents
'simpan file
ActiveWorkbook.Save
Klinik Excel - Input Data Di Excel dengan Macro - Macro & VBA - Forum http://klinikexcel.com/forum/item/5-macro-vba/150-input-data-di-excel-...
2 of 6 3/6/2014 2:09 AM
Klinik Excel - Input Data Di Excel dengan Macro - Macro & VBA - Forum http://klinikexcel.com/forum/item/5-macro-vba/150-input-data-di-excel-...
3 of 6 3/6/2014 2:09 AM
Klinik Excel - Input Data Di Excel dengan Macro - Macro & VBA - Forum http://klinikexcel.com/forum/item/5-macro-vba/150-input-data-di-excel-...
4 of 6 3/6/2014 2:09 AM
Me.Range(Cells(2, 4), Cells(2, 4), Cells(3, 4), Cells(4, 4), Cells(7, 4)).ClearContents
Me.Range(Cells(2, 4), Cells(5, 4)).ClearContents
Klinik Excel - Input Data Di Excel dengan Macro - Macro & VBA - Forum http://klinikexcel.com/forum/item/5-macro-vba/150-input-data-di-excel-...
5 of 6 3/6/2014 2:09 AM
Klinik Excel - Input Data Di Excel dengan Macro - Macro & VBA - Forum http://klinikexcel.com/forum/item/5-macro-vba/150-input-data-di-excel-...
6 of 6 3/6/2014 2:09 AM