Tagged Questions
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 ...
1
vote
2answers
462 views
Excel clear cells based on contents of a list in another sheet
I have an excel Sheet1 of a thousand of rows and 20 columns from A1 to T1. Each cell in that range has some data in it, usually one or two words.
In Sheet2, A1 column I have a list of data of 1000 ...
11
votes
7answers
630 views
Is it possible to fill an array with row numbers which match a certain criteria in Excel VBA without looping through them?
I would like to fill an array in vba with the row numbers of only rows which meet a certain criteria. I would like the fastest method possible (for example, something like RowArray = ...
6
votes
2answers
6k views
How to search for string in MS Access VBA array
Is there an easy (one-liner) to search for a string within an array in MS Access VBA (2010)? Or will I need to loop through each element and compare it with the target string?
EDIT:
It is a ...
4
votes
4answers
12k views
How to find if an array contains a string [duplicate]
Possible Duplicate:
How to search for string in MS Access VBA array
I am currently working on an Excel macro, and I could not find a way to do like
if array.contains(mystring)
I wrote the ...
2
votes
3answers
2k views
Creating a list of all possible unique combinations from an array (using VBA)
Background: I'm pulling all of the field names from a database into an array - I've got this part done without a problem, so I already have an array containing all the fields (allfields()) and I have ...
9
votes
5answers
24k views
2
votes
2answers
3k views
Simple VBA array join not working
I'm puzzled why I can't msgbox this joined array. I can do it just fine if I create a static array with typed out values, but with a range of values from excel I keep getting "Invalid Procedure Call ...
-1
votes
2answers
59 views
Display multiple validation messages to the user
In MS-Access, how can I store the rows retrieved from my SELECT statement in an array, and show many rows in one messagebox:
Dim rSEL, rSUM, rDes As DAO.Recordset
Dim vItem_id, vQnty, vSum As Integer
...
0
votes
3answers
7k views
Sorting a multidimensionnal array in VBA
I have defined the following Array Dim myArray(10,5) as Long and would like to sort it.What would be the best method to do that ?
I will need to handle a lot of data like a 1000 x 5 Matrix. It ...
3
votes
2answers
3k views
Excel VBA Programming with Arrays: To Pass them or Not To Pass them?
Question: I am wondering which is the optimal solution for dealing with Arrays in Excel 2003 VBA
Background: I have a Macro in Excel 2003 that is over 5000 lines. I have built it over the last 2 ...
1
vote
5answers
980 views
vba subscript error
UPDATE: I have been reading some websites and forums about passing arrays between subs and functions. But it got me thinking about whether my variable declarations were the problem? Currently all ...
7
votes
3answers
24k views
Populating VBA dynamic arrays
The following code gives me error 9 "subscript out of range". I meant to declare a dynamic array so that the dimension changes as I add elements to it. Do I have to create a "spot" on the array before ...
6
votes
2answers
12k views
Excel VBA: Variants in Array Variables
A question on variants. Im aware that variants in Excel vba are both the default data type and also inefficient (from the viewpoint of overuse in large apps). However, I regularly use them for ...
4
votes
2answers
2k views
VB - Append to array?
this is probably a super simple question. But I have this Array that I need to strip useless parts from. But I still want it in an array.
So, the array looks like this when it comes in:
ArrValues(0) ...