Pertama tama saya akan mengucapkan selamat kepada anda, sebab jika anda meluangkan waktu untuk membaca postingan ini maka saya akan mengemukakan kepada anda dua asumsi besar
Pertama : You have realized that Excel and the rest of Microsoft's Office Suite have an enormous amount power that is just waiting for you to unlock
Kedua : You have noticed that most of your peers don't understand these capabilities and you want to differentiate yourself from them
Poin kedua akan terealisasi jika anda mampu membuka kunci fitur Microsoft excel yang tersembunyi yang tidak disadari oleh semua rekan rekan sekantor sekampung, beneran jika anda mampu membuat aplikasi dengan menggunakan VBA rekan rekan anda akan terkagum kagum "Apa iya Excel bisa begini ?"
Apa itu VBA
Macros are what most people who write VBA code use. A macro (also can be referred to as a Procedure or Subroutine) is a grouping of code that performs a series of tasks or commands within a targeted computer program (aka Application). Macros can contain code that perform calculations, copy and pastes, changes formatting, and a bunch of other nifty things; all with in milliseconds! Most Office users use macros to automate routine tasks that take them a long period of time to perform manually (by keyboard and mouse)
Yang kurang faham bahasa inggris mulai saat ini belajar bahasa inggris ya, soalnya bahasa VBA tidak ada yang menggunakan bahasa Jawa :D
What The Function Is "Dim"?
I threw this section in especially for a friend of mine who was frustrated with the lack of introductory information on VBA. He said, "Chris, I've been searching everywhere and I wish there was a simple introduction to VBA that could get me started. I mean, I can't even figure out what the heck a Dim is!" So below I will list out a couple terminologies that you might have come across if you have ever recorded a macro of seen VBA code. Leave a comment below if there are any other words that you have come across and would like defined.
Dim - This stands for Dimension and is a statement used to declare a variable name and type that you want to create.
Sub - This is short for Subroutine and is your opening statement for your code. Every time Sub is typed a new macro or procedure is created. The words "End Sub" must be placed as the last line of code for your macro in order to tell VBA that your procedure is finished
Module - This is an area where you can your write function and macro codes. This is also where any macros that you record are stored.
Class Module - This is an area for really advanced VBA users. In this area you can write your own custom classes, methods, and collections into the VBA library. If you are a beginner I would stay away from these for know. Most VBA writers won't ever use this type of functionality during their career but it is a very powerful option to have if needed.
Function - VBA gives you the ability to create your own custom functions. These can either be used by your macros to obtain a certain output or they can be used in the Excel Formula Bar to perform calculations on your cell's values.
Userforms - These are pop-up boxes that allow users to enter inputs or choose options. Microsoft uses these all the time in their applications. Some examples of these are Error Message Boxes, Dialog Boxes, and the Macro Recorder. The cool thing is that VBA gives you the ability to create your own custom Userforms!