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 ...

learn more… | top users | synonyms (1)

14
votes
3answers
2k views

Excel macro - Avoiding using Select [closed]

I've heard much about the understandable abhors of using .Select in Excel VBA Macros, but am unsure of how to avoid using them, or a good resource that can shed some light on how to avoid it. I've ...
2
votes
1answer
2k views

Error Finding Last Used cell In VBA [duplicate]

Possible Duplicate: excel vba row number of last cell with data when finding last Used cell value using Dim last_row As Integer Dim LastRow As Long LastRow = ...
16
votes
3answers
7k views

html parsing of cricinfo scorecards

Aim I am looking to scrape 20/20 cricket scorecard data from the Cricinfo website, ideally into CSV form for data analysis in Excel As an example the current Australian Big Bash 2011/12 scorecards ...
14
votes
15answers
2k views

Non-web SQL Injection

There seems to be some hysteria about SQL Injection attacks. Most recently, here http://stackoverflow.com/questions/505838/vba-simple-database-query-from-word If I'm creating a macro in Excel that ...
53
votes
6answers
52k views

Does VBA have Dictionary Structure?

Does VBA have dictionary structure? Like key<>value array?
27
votes
5answers
106k 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>' ...
3
votes
2answers
984 views

MS Excel crashes when vba code runs

I am having a problem with excel crashing when i run VBA code on an excel sheet. I have some code to add a formula to a range of cells as follows: Private Sub Worksheet_Change(ByVal Target As Range) ...
5
votes
5answers
5k views

Combine rows / concatenate rows

I'm looking for an Access 2007 equivalent to SQL Server's COALESCE function. In SQL Server you could do something like: ---Person--- John Steve Richard DECLARE @PersonList nvarchar(1024) SELECT ...
37
votes
4answers
52k 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 ...
3
votes
2answers
4k views

Last not empty cell in row; Excel VBA

I have an excel sheet which I need to find the last non empty cell in a row. How do I do this? The below will select this for me, but it will select the first not empty cell, I need the last not ...
28
votes
6answers
43k 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 ...
16
votes
5answers
28k views

Password hash function for Excel VBA

I need a function written in Excel VBA that will hash passwords using a standard algorithm such as SHA-1. Something with a simple interface like: Public Function CreateHash(Value As String) As ...
5
votes
1answer
1k views

What's the difference between DoCmd.SetWarnings and CurrentDB.Execute

In the comments on this answer, Remou writes that CurrentDB.Execute "insert sql here" is better than DoCmd.SetWarnings = 0 DoCmd.RunSQL "insert sql here" due to the built-in warnings that ...
33
votes
6answers
48k 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 ...
20
votes
3answers
14k views

Is There a JSON Parser for VB6 / VBA?

I am trying to consume a web service in VB6. The service - which I control - currently can return a SOAP/XML message or JSON. I am having a really difficult time figuring out if VB6's SOAP type ...

1 2 3 4 5 109
15 30 50 per page