14 votes
Accepted

Format RGB Long as hex string in VB6

The code you have works, and is very nicely-formatted. There are only two things I would change, stylistically speaking: Explicitly pass input parameters by value. This should have been the default, ...
Cody Gray - on strike's user avatar
12 votes

Format RGB Long as hex string in VB6

I'll just focus on performance, because that's the fun part. You're correct to be worried about the string manipulations, so you should obviously try to minimize them. The other thing you should be ...
Comintern's user avatar
  • 4,192
10 votes

Format RGB Long as hex string in VB6

Obviously @Comintern knocks out the bit-swapping part, so this answer is more about, well, every other aspect of the code. Signature Kudos for proper PascalCase! ...
Mathieu Guindon's user avatar
9 votes

List<T> implementation for VB6/VBA

Your implementation of Sort would be optimised by implementing IndexOfMin so that ...
Mark Hurd's user avatar
  • 326
9 votes
Accepted

App for providing accounting solutions for clients

You only asked for suggestions how to make this code faster. However, after discussing what might be the issue with performance here, I will provide some comments regarding general maintainability ...
M.Doerner's user avatar
  • 1,490
6 votes

Format RGB Long as hex string in VB6

...
Roland Illig's user avatar
  • 21.3k
5 votes

Format RGB Long as hex string in VB6

@Comintern got you some performance, and @MatsMug reviewed your code, but nobody had properly addressed your concern over the strings. Every Right$ call requires a ...
ThunderFrame's user avatar
  • 1,959
5 votes
Accepted

Materializing any ADODB Query

I want to focus on the SqlResult/SqlResultRow classes here. The way it is, it is analogous to having bought a huge expensive ...
this's user avatar
  • 2,029
4 votes

Shared VB6 *and* VBA extensibility add-in with OnConnect and OnDisconnect handling

OnConnection and OnStartupComplete I can forsee a problem arising. Assume the addin is started with ext_ConnectMode.ext_cm_AfterStartup then in the ...
Heslacher's user avatar
  • 50.4k
3 votes

A CSharpish String.Format formatting helper

As mentioned in the comments, note that this is "reviewing" the code in the self-answer: The Replace calls effectively implementing the missing ...
Mark Hurd's user avatar
  • 326
3 votes

A more readable InStr: StringContains

The lack of null handling and the lack of a single-variable StringMatches function were bothering me. If StringContainsAny calls ...
Steven Reese's user avatar
3 votes

A more readable InStr: StringContains

I came here after reading a related post in the retailcoder blog, Enhancing VBA String Handling. Take into account that in the InStr function if String2 is an empty string then the returned value is ...
kennyk4silva's user avatar
3 votes

Creating ADODB Parameters on the fly

Waking this one up... ExecuteNonQuery Return value never assigned ExecuteNonQuery never has its return value assigned. Return value type You have an ...
ThunderFrame's user avatar
  • 1,959
3 votes

Format RGB Long as hex string in VB6

Time Measurements! I tested all of the other answers' code and want to publish the results. This might help compare the different implementations and maybe tell us something about how to optimize VB6 ...
Felix Dombek's user avatar
  • 1,081
2 votes
Accepted

ADODB Wrapper Class (Revisited)

CommandTimeout: Allowing the client to specify a given command's execution time threshold by making it a read/write property is good improvement from the first post of this class, that you did not ...
rickmanalexander's user avatar
2 votes
Accepted

ADODB Wrapper Class

"The Properties ParameterNumericScale and ParameterPrecision are used for setting the total number of digits and number of digits to the right of the decimal point in a number respectively. I opted to ...
rickmanalexander's user avatar
1 vote

Revisited IsTypeSafe method implementation for "type-safe" List

Just two nitpicks after years. :-) Regarding the error handling in those IsSafe... procedures: Err.Clear is superfluous there. ...
AHeyne's user avatar
  • 428
1 vote

FileWriter supporting writing to multiple files

In response to RubberDucks getErrorMessage procedure, I got the idea to use Choose (I was right now thinking about a possible ...
AHeyne's user avatar
  • 428
1 vote

Materializing any ADODB Query

Is there any reason you don't use a disconnected record set and just close the connection in the function that opened it? I wouldn't keep a connection open any longer than you need. ...
Allen Mattson's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible