Visual Basic for Applications (VBA) is an event-driven, object-oriented programming language for writing macros, used for the entire Office suite. If your question is specifically about programming Excel, Access, Word or Outlook, use the appropriate tag: excel-vba, access-vba, word-vba or ...
63
votes
6answers
31k views
Difference between Visual Basic and VBA
What is the difference between the two. I always thought VBA is somewhat 'crippled' version of VB, but when a friend asked me the other day I had no idea what the actual differences are.
Also, when ...
53
votes
6answers
50k views
53
votes
11answers
9k views
Is VB really case insensitive?
I'm not trying to start an argument here, but for whatever reason it's typically stated that Visual Basic is case insensitive and C languages aren't (and somehow that is a good thing).
But here's my ...
35
votes
4answers
51k views
How can I send an HTTP POST request to a server from Excel using VBA?
What VBA code is required to peform an HTTP POST from an Excel spreadsheet?
Accepted Answer Note: For greater control over the HTTP request you can use "WinHttp.WinHttpRequest.5.1" in place of ...
31
votes
6answers
47k views
What does the keyword Set actually do in VBA?
Hopefully an easy question, but I'd quite like a technical answer to this!
What's the difference between:
i = 4
and
set i = 4
in VBA? I know that the latter will throw an error, but I don't ...
28
votes
14answers
998 views
How to get started with Visual Basic for Applications? [closed]
I'm a little intimidated by the wealth of knowledge displayed on the front page of this website, but it gives me hope that I'm talking to the right people. I had a pretty rotten experience with one ...
28
votes
6answers
42k views
VBA array sort function?
I'm looking for a decent sort implementation for arrays in VBA. A Quicksort would be preferred. Or any other sort algorithm other than bubble or merge would suffice.
Please note that this is to work ...
27
votes
5answers
104k views
How to parse XML in VBA
I work in VBA, and want to parse a string eg
<PointN xsi:type='typens:PointN'
xmlns:xsi='<http://www.w3.org/2001/XMLSchema-instance>'
...
27
votes
9answers
5k views
Best way to test a MS Access application?
With the code, forms and data inside the same database I am wondering what are the best practices to design a suite of tests for a Microsoft Access application (say for Access 2007).
One of the main ...
27
votes
1answer
11k views
Parsing JSON in Excel VBA
I have the same issue as in Excel VBA: Parsed JSON Object Loop but cannot find any solution. My JSON has nested objects so suggested solution like VBJSON and vba-json do not work for me. I also fixed ...
24
votes
2answers
498 views
Controlling Excel via Midi controller
I've got one of these
and wanted to use the sliders on it to control Excel, just like one of the Excel form control scroll bars.
I've managed to modify this code for VBA, but it is extremely ...
23
votes
7answers
48k views
Deleting a file in VBA
Using VBA, how can I (a) test whether a file exists, and if so, (b) delete it?
23
votes
7answers
76k views
What does the Excel VBA range.Rows property really do?
OK, I am finishing up an add-on project for a legacy Excel-VBA application, and I have once again run up against the conundrum of the mysterious range.Rows(?) and worksheet.Rows properties. Does ...
22
votes
10answers
25k views
When to use a Class in VBA?
When is it appropriate to use a class in Visual Basic for Applications (VBA)?
I'm assuming the accelerated development and reduction of introducing bugs is a common benefit for most languages that ...
22
votes
2answers
755 views
To infinity and beyond in VBA
This post is about .NET NaN's & Inifinite values getting passed back to Excel 2010 VBA.
I use a C# method not under my control which (apparently) can return .NET NaN's or Neg,Pos Infinity. The ...