Kamus Macro Excel

admin howto-123.com on January 15th, 2015

Macro excel dalam bentuk kamus ini dibuat untuk memudahkan para macro-er (maaf rada maksa :) ,  pengganti programmer yang suka bikin macro). Berikut kumpulan sintaks macro :

Insya Allah akan diupdate berkala. Jika rekan-rekan ingin menambahkan silakan ditulis di bagian komentar.

Cells – Value

example #1
TextCaptureA = Range(“A” & DataRecordSource).Value

example #2
Range(“A1″).Select

example #3
ActiveCell.FormulaR1C1 = “key1″

example #4
Range(“A2″).Select
ActiveCell.FormulaR1C1 = “=RC[2]&RC[7]”

example #5
FileSource = Range(“_FormSource”).Value
FileTarget = Range(“_FormTarget”).Value

Cells – Copy Paste Area

Range(“E30:AQ32″).Select
Selection.Copy
Range(“E150:AQ152″).Select
ActiveSheet.Paste

Application.CutCopyMode = False

Cells – Pilih Cells/Range

Range(“B9″).Select

Cells – Posisi/Potition

PosisiBaris = ActiveCell.row

PosisiKolom = ActiveCell.col

Column – AutoFit

Columns(“A:A”).EntireColumn.AutoFit

Column – Insert 1 Column

Columns(“A:A”).Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove

Column – Unhide

Columns(“F:AH”).Select
Selection.EntireColumn.Hidden = False
Range(“C19″).Select

Copy

MaxBaris = Range(“A2″).End(xlDown).Row
Range(“A2:H” & MaxBaris).Select
Selection.Copy

File & Folder – Macro Open Folder

Sub OpenFolder()
Dim MyFolder As String
MyFolder = “C:\PATH\”
ActiveWorkbook.FollowHyperlink MyFolder
End Sub

ChDir “D:\DATA.Office\DATA.Macro”

File & Folder – Open File

On Error Resume Next
Dim excelFile As String
excelFile = “test1.xlsm”
‘open excel file “myfile.xls” in drive D:\
Workbooks.Open “c:\users\test\” & excelFile

File & Folder – Path File Information

BacaPathFile = ThisWorkbook.FullName

Filter – Unselect Data

Selection.AutoFilter
ActiveWindow.SmallScroll Down:=-3

Font – Bold and Colour (red)

Range(“I” & sStart2 & “:I” & rStart).Select
Selection.Font.Bold = True
With Selection.Font
.Color = -16776961
.TintAndShade = 0
End With

Format – General

Selection.NumberFormat = “General”

Format – Tanggal

Selection.NumberFormat = “yyyy.mm.dd”

If Then Else – Exit

If .. Then

Exit Sub

End If

Message Box

MsgBox (Filename & ” has been created in” & Source_Folder)

Paste

Range(“A2″).Select
ActiveSheet.Paste

Process – Show Process

‘#show process

Application.ScreenUpdating = False

Range – Delete

Range(“A2:Y37″).Delete

Rows – Pilih Baris

Rows(“2:2″).Select

Selection.Delete Shift:=xlUp

Rows – Pilih Baris, Kemudian Hapus

Rows(“2:2″).Select
Selection.Delete Shift:=xlUp

Rows – Baris Terakhir (Max)

Range(“B1″).Select
Range(Selection, Selection.End(xlDown)).Select

Range(“B100″).Select
Range(Selection, Selection.End(xlUp)).Select

maximum_lines = Worksheets(“TEMP”).Range(“A4″).End(xlDown).Row

Selection – Range

Range(Selection, Selection.SpecialCells(xlLastCell)).Select

Sheets – Pilih Sheet

Sheets(“NamaSheet”).Select

Workbooks(“NAMA_SHEET”).Activate

Worksheets(“NAMA_SHEET”).Activate

Worksheets(“NAMA_SHEET”).Select

Sheets – Copy Sheet

Sheets(“NamaSheet”).Copy

Windows – Pilih File

Windows(“Nama_File.XLS”).Activate

Semoga kamus macro excel ini bermanfaat bagi siapapun.

Incoming search terms:

  • kamus macro excel
  • kamus macro excell
  • membuat kamus dengan macro excel

Leave a Reply