Top "Vba" questions

Visual Basic for Applications (VBA) is an event-driven, object-oriented programming language for writing macros, used for the entire Office suite as well as other applications.

Declare and Initialize String Array in VBA

This should work according to another stack overflow post but its not: Dim arrWsNames As String() = {"Value1", "Value2"} Can anyone …

arrays vba initialization
How to get the path of current worksheet in VBA?

I wrote a macro as an add-in, and I need to get the path of the current worksheet on which …

excel vba
Loop through files in a folder using VBA?

I would like to loop through the files of a directory using vba in Excel 2010. In the loop, I will …

excel vba
How to add a named sheet at the end of all Excel sheets?

I am trying to add an Excel sheet named "Temp" at the end of all existing sheets, but this code …

excel vba worksheet
How to comment and uncomment blocks of code in the Office VBA Editor

In the VBA editor of Office (ALT + F11), how do you comment or uncomment a block of code?

vba comments
VBA: Selecting range by variables

I want to select the formatted range of an Excel sheet. To define the last and first row I use …

vba variables range selection
Convert string to int if string is a number

I need to convert a string, obtained from excel, in VBA to an interger. To do so I'm using CInt() …

excel vba
Excel: How to check if a cell is empty with VBA?

Via VBA how can I check if a cell is empty from another with specific information? For example: If A:…

excel vba
Sum function in VBA

I have a problem with summing cells in vba. I need to use Cells(a,b): Range("A1").function="=SUM(…

excel vba sum cells
How do I express "if value is not empty" in the VBA language?

How do I express the condition "if value is not empty" in the VBA language? Is it something like this? "…

excel vba