vba

81 expert-verified Q&A posts in this category, sourced from the top-voted answers on Stack Overflow.

Solved November 26, 2009

Building SQL strings in Access/VBA

Occasionally, I have had to build a SQL string in VBA and execute it with Docmd.RunSql(). I have always built these strings by concatenating…

thumb_up 8 trending_up 14
Solved October 30, 2009

Get the week number from a given date

Examples: 'DD/MM/YYYY "1/1/2009" should give `1` "31/1/2009" should give `5` "1/2/2009" should also give `5` Format("1/2/2009", "ww") returns 6. So, how can I get…

thumb_up 22 trending_up 8
Solved October 22, 2009

Finding similar sounding text in VBA

My manager tells me that there is a way to evaluate names that are spelled differently but sound similar in the way they are…

thumb_up 18 trending_up 12
Solved September 17, 2009

VBA Shell and Wait with Exit Code

I am wrapping up an office application (VBA) that makes a call to a C# console application to perform some of the heavy lifting…

thumb_up 10 trending_up 6
Solved August 21, 2009

Use VBA to call a cellphone

About a year ago, a manager in another department brainstormed that I could code up some VBA to auto call me in the event…

thumb_up 10 trending_up 4
Solved June 14, 2009

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 friend asked me the…

thumb_up 122 trending_up 154
Solved June 1, 2009

Environ Function code samples for VBA

I am looking for some information or code samples for the Environ Function in VBA to grab the username on the current system.

thumb_up 30 trending_up 15
Solved November 4, 2008

Overflow when calculating a const in VBA

This declaration causes an overflow in VBA: Const OVERFLOWS As Long = 10 * 60 * 60 whereas setting the value directly is fine:…

thumb_up 13 trending_up 10