ActiveWorkbook : File yang sedang Terbuka
Active Worksheet : Sheet yang Tampil
Worksheet : Sheet
Sheet("sheet1") : Nama Sheet1
Range : Alamat Cell
Range("A5") : sama dengan Cell A5
Range("A5:A20") : Cell A5 sampai A20
Range("A5") : Baris no 1,Kolom no 5
Range("A5") : disingkat Cell(1,5)
Selection : Cell Pilihan ( blok atau kursor )
Select : Pilihan yang dituju
Range("A5"). Select : Menuju ke Cell A5
Sheet1.Select : Menuju ke Sheet1
Sheet(1).Select : Sheet berdasarkan urutan sheet
Sheet("data") : Sheet berdasarkan Nama sheet
Value = : Isi
Value = " " : Isi Cell Kosong
Worksheet("sheet1").Range("A5:A20").Value = ""
Sub Modul1 () : Memulai suatu Prosedur
End Sub : Mengakhiri suatu Prosedur
Sheet1.Range("A1:C1").Copy Destination:=Sheet2.Range("A1")
: Sheet1copy dan paste di sheet 2
Protect : Mengunci agar tidak dapat di edit
ActiveSheet.Protect : Mengunci Sheet Active
ActiveSheet.unProtect : membuka kunci Sheet Active
Sheet1.Visible = 1 : Sembuyikan Sheet1
Sheet1.Visible = 2 : Jangan Sembuyikan Sheet1
Sheet1.Visible = True : Sembuyikan Sheet1
Sheet1.Visible = False : Jangan Sembuyikan Sheet1
Private Sub UserForm_Initialize()
: Perintah otomatis saat UserForm muncul
Show : Tampil atau aktif
UserForm1. Show : UserForm1. Tampil
Unload me : UserForm ditutup
Hide : Disembunyikan
Hide me : UserForm yand aktif disembunyikan
ColumnWidth = 12 : ukuran Tinggi Kolom
RowHeight = 15 : ukuran Lebar Baris
ActiveCell.EntireColumn.ColumnWidth = 12
ActiveCell.EntireRow.RowHeight = 15
ListBox1.List(ListBox1.ListIndex, 1) :
Menampilkan data baris sesuai no kolom pd listbox1
TextBox1.Value = ListBox1.List(ListBox1.ListIndex, 1)
TextBox2.Value = ListBox1.List(ListBox1.ListIndex, 2)
RowSource : Nama range yang ditampilkan pd listbox
RowSource = Worksheets(1).Range("A1:A10").Address
PrintOut : Perintah Cetak
from:=1, : Dari Halaman
To:=1, : Sampai Halaman
Copies:=1 : Jumlah Lembar
ActiveSheet. PrintOut from:=1, To:=1, Copies:=1
PrintOut Preview : Menampilkan halaman Cetak
ActiveSheet.PrintOut Preview:=True, From:=1, To:=2, Copies:=2
Row.Hidden : Sembunyikan baris jika = true
Rows("5"). : Baris Ke -5
Rows("5").EntireRow.Hidden = True
Rows("7").EntireRow.Hidden = False
EntireRow.Insert : Menambah baris
EntireRow.Delet : Menghapus baris
ActiveCell.EntireRow.Insert
ActiveCell.EntireRow.delet
Columns(8).Hidden : Sembunyikan kolom 8
Columns(8).Hidden = True : Sembunyikan kolom jika = true
ActiveSheet.Columns(8).Hidden = True
ActiveSheet.Columns(9).Hidden = False
Insert Shift:=xlRight :Menambah Kolom
Delete Shift:=xlToLeft :Menghapus Kolom
ActiveSheet.Columns(6).Insert Shift:=xlRight
Columns("F:F").Select
Selection.Delete Shift:=xlToLeft
Application.Visible = True : Sembuyikan lembar Kerja
Application.Visible = False : Jangan lembar Kerja
Private Sub : Perintah otomatis saat
Private Sub Workbook_Open()
: Perintah otomatis saat Workbook di buka
Private Sub Workbook_Open()
Application.Visible = False
UserForm1.Show
Application.Visible = True
End Sub
Private Sub Worksheet_SelectionChange
: Perintah otomatis pada sheet active
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Sheets("Sheet1").Range("A1") = "Belajar VBA"
End Sub
Font.FontStyle = "Italic" : Jenis Text
Font.Size = 14 : Ukuran Text
Sheets(“sheet1”).Range("A1").Font.FontStyle = "Italic"
Sheets(“sheet1”).Range("A1:A5").Font.Size = 14
Borders.LineStyle : Border Cell
Range("a5:e5").Borders.LineStyle = xlContinuous
Font. ColorIndex = 3 : Warna Text
Interior.ColorIndex = 4 : Warna Cell
Sheets(“sheet1”).Range("A2").Font. ColorIndex = 3
Sheets(“sheet1”).Range("A2").Interior.ColorIndex = 4
https://m.facebook.com/i.p.asana?ref=bookmarks
SUMBER TULISAN :
https://excelsuport.blogspot.com/2018/06/belajar-konsep-dasar-vba-bagi-pemula.html
Tidak ada komentar:
Posting Komentar