A. Form
1. Menampilkan form
UserForm.Show
2. Menutup Form
Unload UserForm
B. Enabled/Disabled
1. Mengaktifkan button
Button.enabled = true
2. Menonaktifkan button
Button.enabled = false
C. Menampilkan/menyembunyikan button
1. Menampilkan button
Button.visible = true
2. Menyembunyikan button
Button.visible=false
D. Pencarian
Set cell = Range("A1:A6").Find("teks yg dicari")
-menampilkan alamat sel hasil pencarian
cell.Address
D. Cetak
1. Cetak layar
Range("range").printpreview
2. Cetak printout
Range("range").printout
E. SIMPAN FILE
Set wbThis = ActiveWorkbook
wbThis.Save
F. COUNTA
a = Application.WorksheetFunction.CountA(ThisWorkbook.Sheets("sheet1").Range("A3:a"))
G. COUNTIF
d = Application.WorksheetFunction.CountIf(Range("bd3:bd1048576"), "<=" & 0)
H. FORMAT CURRENCY
lblBudget.Caption = Format(CInt(lblBudget.Caption), "$ #,###,###.00")
G. FILTER DATA
Sub Filter()
Worksheets("SHEET").Activate
Worksheets("SHEET").Range("RANGE").AutoFilter Field:=No_column, Criteria1:="kriteria"
End Sub
Tidak ada komentar:
Posting Komentar