excel-vba

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

Solved June 10, 2010

How to clear the entire array?

I have an array like this: Dim aFirstArray() As Variant How do I clear the entire array? What about a collection?

thumb_up 58 trending_up 29
Solved December 15, 2009

Moving images between cells in VBA

I have an image in cell (3,1) and would like to move the image into cell (1,1). I have this code: ActiveSheet.Cells(1, 1).Value =…

thumb_up 7 trending_up 8
Solved November 29, 2009

Excel VBA function returning an array

Can you create an Excel VBA function that returns an array in the same manner as LINEST does, for example? I would to create…

thumb_up 8 trending_up 5
Solved November 21, 2009

Forcing Garbage Collection

Is there a way to force garbage collection in VBA/Excel 2000? This question refers to the Macro language in Excel. Not using VB .NET…

thumb_up 9 trending_up 4
Solved October 12, 2009

How to fall through a Select Case in Excel VBA?

Given Select Case cmd case "ONE": MsgBox "one" case "TWO": MsgBox "two" case "THREE": MsgBox "three" End select My requirement is if cmd =…

thumb_up 12 trending_up 6