-
Jul 7th, 2020, 07:44 AM
#1
Office 64-Bit-VBA - Glitch/Bug or feature?
Hi Folks,
today i got confronted with something weird:
I have several vba-scripts (word and excel), where i access a database via ADO.
On 32-Bit it worked without problems for years.
Now, some computers have been moved to Win10/Office19 - both 64-Bit!
After i got around this infernal #If VBA7 Then-Crap my code threw me an error i couldn't understand at first:
Say, i call an SELECT-SQL-Statement the usual ADO-way (Opened a connection, opened a RecordSet-Object).
I did the following:
Dim RecCount As Long
RecCount = MyRS.RecordCount
That line threw me an error "Type Mismatch" ?!?!?!??!
After working around that, i noticed something:
If i singlestep through the code, and execution stays on exactly that line --> the infamous "yellow bar" (and i know for a fact that the RecordCount is >0)
and i move my mouse over "MyRS.RecordCount" it showed me "6408^" (Yes, a "caret" or whatever the name is of that symbol after digit "8"). The shown RecordCount is arbitrary right now.
Can someone confirm??
A Debug.Print MyRS.Recordcount doesn't show that symbol, the same for the Watch-Window. It's why i missed it the first time around.
my workaround that one is a "Clng(Trim(MyRS.RecordCount))" which shouldn't be neccessary
Something else: Has anyone found a replacement for the DatePicker?
No DatePicker-Control in Office-64-Bit!
Last edited by Zvoni; Tomorrow at 31:69 PM.
----------------------------------------------------------------------------------------
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------------------
People call me crazy because i'm jumping out of perfectly fine airplanes.
---------------------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|