you need to attach the process after the module has loaded - your only chance at it is to attach while the msgbox is shown, since it's the initialization that's throwing
I have to say that this is pretty damn impressive. Really. I'm not going to go through this line by line; my general impression is that it looks pretty readable, procedures are of decent length, it's clear what's going on.
I wonder why the late binding here:
Private criteria As Object
Private S...
This is what I would do safely store connection string credentials
Download and install Visual Studio Express 2012 for Windows (FREE)
Open it as Administrator and create a New Project. Select Visual C# then Class Library and rename it to HiddenConnectionString
In the Solution Explorer, renam...
Also @Mat'sMug WndProc behaves a little differently in 64 bit, so that could be why you're not having the issue. Maybe. You think it's worthwhile to put a try catch down there to see if I can't get a better message. Debugger is broken again...
The story...
A bit of background info and how is the database designed...
Please notice you don't really have to rebuild the tables in SQL but I shared an SQL Fiddle just in case and screenshots1 of what the database looks like. I thought it was going to be easier to explain the story and desig...
The story...
A bit of background info and how is the database designed...
Please notice you don't really have to rebuild the tables in SQL but I shared an SQL Fiddle just in case and screenshots1 of what the database looks like. I thought it was going to be easier to explain the story of what I...
Ok, I´ve found similar questions but none of them solve this problem so here I go:
I´ve a list of individuals (col. "A"), and each of them has a value assigned for a determined parameter (col. "B").
I´ve some target parameter values and I want to know which combinations of individuals sum up "x"...
Public Sub foo()
Dim bar As Date
Debug.Print TypeName(bar), IsEmpty(bar), bar = vbEmpty
bar = Now
Debug.Print TypeName(bar), IsEmpty(bar), bar = vbEmpty
bar = vbEmpty
Debug.Print TypeName(bar), IsEmpty(bar), bar = vbEmpty
End Sub
Public Sub foo()
Dim bar
Debug.Print TypeName(bar), IsEmpty(bar), bar = vbEmpty
bar = Now
Debug.Print TypeName(bar), IsEmpty(bar), bar = vbEmpty
bar = vbEmpty
Debug.Print TypeName(bar), IsEmpty(bar), bar = vbEmpty
End Sub
thisworkbook.foo
Empty True True
Date False False
Long False True
Public Sub foo()
Dim bar
Dim nullDate
Debug.Print TypeName(bar), IsEmpty(bar), bar = vbEmpty
bar = Now
Debug.Print TypeName(bar), IsEmpty(bar), bar = vbEmpty
bar = nullDate
Debug.Print TypeName(bar), IsEmpty(bar), bar = vbEmpty
End Sub
thisworkbook.foo
Empty True True
Date False False
Empty True True
> You're a good programmer, so I won't question that you need to use On Error Resume Next here, but you definitely should add a comment here explaining why you're doing it. As it is, I don't have to domain knowledge to understand why you're doing this (and neither will the person maintaining the code someday).
It seems the other answer didn't touch the Gator class, so I'll focus on that.
' Required .dlls
' `Microsoft Internet Controls`
Well done right there. All too often there is no documentation about what references a piece of code needs to work. Someone will thank you for that someday withou...
@RubberDuck you missed a potential bug with that On Error Resume Next
IdExists should say On Error GoTo 0 immediately after the line that expects the error, to restore error handling. Otherwise it may be hiding problems, because On Error Resume Next turns off error handling altogether, even beyond the procedure's scope (until another On Error statement is encountered). — Mat's Mug33 secs ago
> An On Error Resume Next statement becomes inactive when another procedure is called, so you should execute an On Error Resume Next statement in each called routine if you want inline error handling within that routine.
anyway you're right, it doesn't. this never prints "nope":
Public Sub foo()
On Error GoTo Jail
bar
On Error Resume Next
bar
Exit Sub
Jail:
Debug.Print "handled"
Resume Next
End Sub
Public Sub bar()
Err.Raise 999
Debug.Print "nope"
End Sub
@RubberDuck technically you can still get hard crashes in some cases even with on error resume next, I've had ActiveX objects throw non-debuggable errors (and not otherwise catchable, for that matter) with that set in futile attempts to actually find the line of code the error happens on...
@RubberDuck I think the former NOT EXISTS is better because it only has to scan your data set once (for more conditions) rather than twice (with fewer conditions)
@RubberDuck added 2 new labels to identify code inspection types, and upated all issues under Code Inspections - there's "Code Quality Issues" and "Maintainability/Readability Issues" for now.