Pengertian Macro Excel Macro adalah sebuah fasilitas yang
Pengertian Macro Excel Macro adalah sebuah fasilitas yang ada pada Microsoft Excel yang dapat digunakan untuk merekam segala tindakan dan perintah yang dilakukan oleh program Excel. Macro juga bisa diartikan sebagai sederetan fungsi dan perintah program yang disimpan dalam menu Visual Basic. Artinya Visual Basic disini digunakan sebagai alat bantu dalam proses perekaman.
Langkah Pembuatan Macro • Tampilkan Menu Developer dengan cara klik kanan pada Menubar kemudian pilih Customize Quick Access Toolbar kemudian muncul kotak dialog pilih opsi Popular kemudian (√) Show Developer Tab Ribbon.
• Kemudian pada book 1 pilih menu Developer lalu pilih Record Macro sendiri digunakan untuk membuat atau merekam tindakan yang akan dilakukan pada Excel.
• Tampilan kotak dialog Macro dan beri nama Merah.
Batasan Untuk Nama Macro Recorder 1. Panjang karakter maximal 255 digit 2. Harus diawali dengan karakter, bukan angka, dan tidak diperkenankan ada spasi 3. Tidak mengandung tanda khusus seperti : +, -, *, ^, $ 4. Menggambarkan instruksi kode Macro Recorder Kode adalah suatu teks yang merupakan bagian terkecil dari penulisan pernyataan, contoh : properti, metode, fungsi, keyword, untuk masuk ke prosedur Visual Basic 5. Bukan suatu nama fungsi, metode, argumen, properti dan keyword
Untuk memberikan shortcut key pada macro recorder, perhatikan bentuk penulisan huruf ( Case Sensitive ). Penulisan Keterangan Huruf Kecil Untuk menjalankannya dapat menekan variasi tombol keyboard dengan Ctrl+Key, contoh : Ctrl+e Huruf Besar Untuk menjalankannya dapat menekan variasi tombol keyboard dengan Ctrl+Shift+Key, contoh : Ctrl+Shift+E
Dalam kotak pilihan Store Macro In, pilih salah satu sebagai tujuan tempat penyimpanan macro, dengan 3 pilihan, yaitu : Nama Keterangan Personal Macro Workbook Disimpan di dalam file yang tersembunyi dengan nama Personal. Xls di dalam folder Xlstart. This Workbook Disimpan di dalam workbook sumber tempat pembuatan macro recorder New Workbook Disimpan di dalam workbook baru yang akan dibuka setelah membuka workbook sumber tempat pembuatan macro recorder
• Kembali ke langkah blok cells A 1 sampai C 4 kemudian beri warna merah pada blok tersebut. Setelah itu letakkan kursor pada sembarang tempat dan pilih Menu Developer kembali dan pilih Stop Recording. • Kemudian langkah selanjutnya adalah ulangi cara pada macro merah tadi hanya saja nama dan warnanya diganti dengan Kuning dan Hijau
• Setelah itu buat Shape pada A 6 sampai B 7 kemudian klik kanan lalu Edit Text. Isikan nama Merah. • Kemudian lakukan hal yang sama untuk Kuning dan Hijau. Kemudian berikut tampilan sementara :
• Lalu pada Shape yang bertulis nama Merah klik kanan lalu pilih Assign Macro. Kemudian pilih Macros name-nya. Kemudian lakukan hal yang sama pada Kuning dan Hijau.
Menjalankan Macro Excel Menjalankan Macro dalam Microsoft Excel, yaitu dengan cara pilih Menu Developer kemudian klik Macros. Kemudian muncul kotak dialog Macros. Pilih Macros Name-nya kemudian klik Run.
Menghapus Perintah Macro Prosedur untuk adalah: menghapus perintah Macro § Pilih menu Developer lalu Macros § Pilih salah satu nama perintah macrorecorder yang ada pada kotak pilihan Macro Name § Tekan tombol delete untuk menghapus salah satu nama dari perintah macro recorder § Tekan tombol Yes untuk memastikan penghapusan atau No untuk membatalkan
- Slides: 12