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.

Return multiple values from a function, sub or type?

So I was wondering, how can I return multiple values from a function, sub or type in VBA? I've got …

function vba return-value ms-word
vba: get unique values from array

Is there any built-in functionality in vba to get unique values from a one-dimensional array? What about just getting rid …

vba algorithm excel unique
VBA paste range

I have simple goal of copying range and pasting it into another spreadsheet. The following code below gives copies, but …

excel vba range paste
How to add parameters to an external data query in Excel which can't be displayed graphically?

I often use MS Excel's Get External Data to create simple reports - running queries against databases and displaying nicely …

excel vba excel-2007 ms-query
VBA general way for pulling data out of SAP

Does anyone know how to use VBA to pull data from SAP Netweaver? I have a number of daily reports …

excel vba netweaver
Loop Through All Subfolders Using VBA

I'm looking for a VBA script that will loop through all subfolders of a specified folder. When I say all …

vba filesystemobject
Difference between Visual Basic 6.0 and VBA

What is the difference between the two. I always thought VBA is somewhat 'crippled' version of VB, but when a …

vba vb6
How do you run a .exe with parameters using vba's shell()?

I have a target file path that is structured like example below. C:\Program Files\Test\foobar.exe /G What …

excel vba shell parameters command-line-arguments
How to automatically insert a blank row after a group of data

I have created a sample table below that is similar-enough to my table in excel that it should serve to …

excel vba rollup blank-line
Is there a macro to conditionally copy rows to another worksheet?

Is there a macro or a way to conditionally copy rows from one worksheet to another in Excel 2003? I'm pulling …

excel copy excel-2003 worksheet vba