Pertanyaan dan Jawaban Wawancara Paling Populer & Tes Online
Platform edukasi untuk persiapan wawancara, tes online, tutorial, dan latihan langsung

Bangun keterampilan dengan jalur belajar terfokus, tes simulasi, dan konten siap wawancara.

WithoutBook menghadirkan pertanyaan wawancara per subjek, tes latihan online, tutorial, dan panduan perbandingan dalam satu ruang belajar yang responsif.

Prepare Interview

Ujian Simulasi

Jadikan Beranda

Bookmark halaman ini

Langganan Alamat Email

VBA Pertanyaan dan Jawaban Wawancara

Ques 1. What is VBA?

VBA stands for Visual Basic for Applications. It is a programming language developed by Microsoft for automating tasks in Microsoft Office applications.

Example:

Sub HelloWorld()
   MsgBox "Hello, World!"
End Sub

Apakah ini membantu? Add Comment View Comments
 

Ques 2. How do you declare a variable in VBA?

You declare a variable using the 'Dim' keyword. For example, Dim myVar As Integer.

Example:

Dim myVar As String
myVar = "Hello"

Apakah ini membantu? Add Comment View Comments
 

Ques 3. Explain the difference between 'ByVal' and 'ByRef' in VBA.

'ByVal' passes the value of the variable to the function, while 'ByRef' passes a reference to the variable, allowing the function to modify its value.

Example:

Sub ModifyValue(ByRef x As Integer)
   x = x + 1
End Sub

Apakah ini membantu? Add Comment View Comments
 

Ques 4. How do you handle errors in VBA?

You can use 'On Error' statements to handle errors. For example, 'On Error Resume Next' to ignore errors, or 'On Error Goto' to jump to a specified label.

Example:

On Error Resume Next
   ' code that may cause an error
On Error GoTo 0

Apakah ini membantu? Add Comment View Comments
 

Ques 5. What is the difference between 'ActiveWorkbook' and 'ThisWorkbook'?

'ActiveWorkbook' refers to the currently active workbook, while 'ThisWorkbook' refers to the workbook where the VBA code is written.

Example:

Dim ws As Worksheet
Set ws = ThisWorkbook.Worksheets(1)

Apakah ini membantu? Add Comment View Comments
 

Most helpful rated by users:

Hak Cipta © 2026, WithoutBook.