Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActiveX DLL - DoEvents hangs when used in tB #1440

Closed
GCuser99 opened this issue Dec 31, 2022 · 3 comments
Closed

ActiveX DLL - DoEvents hangs when used in tB #1440

GCuser99 opened this issue Dec 31, 2022 · 3 comments

Comments

@GCuser99
Copy link

Describe the bug
VBA's DoEvents hangs when used in a tB ActiveX DLL.

To Reproduce
Steps to reproduce the behavior:
Open tB and initialize an ActiveX DLL project.
Make a MyClass.cls in tB like below:

Attribute VB_Name = "MyClass"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True

' add your member fields and procedures here
Sub DoDoEvents()
    DoEvents
    MsgBox "Done"
End Sub

Compile the DLL in tB.
In Excel, reference the DLL and run the following Sub:

Sub Test_DoEvents()
    Dim mc As New MyClass
    mc.DoDoEvents
End Sub

The sub hangs in Excel VBA and does not show message "Done".

Expected behavior
Running the sub in VBA should return message "Done".

Screenshots
none

Desktop:

  • OS: Windows 11
  • Excel 365 (64-bit)
  • twinBASIC compiler version IDE Beta 201

Additional context
The sub Test_DoEvents works fine in tB's IDE from MainModule.twin.

@GCuser99 GCuser99 changed the title DoEvents hangs when used in tB ActiveX DLL ActiveX DLL - DoEvents hangs when used in tB Dec 31, 2022
@WaynePhillipsEA
Copy link
Collaborator

Fixed in BETA 220. Thanks!

@GCuser99
Copy link
Author

GCuser99 commented Jan 9, 2023

Thanks Wayne. For compiling ActiveX Dlls, should I continue to use version 201, or can I use the latest version?

@WaynePhillipsEA
Copy link
Collaborator

You're welcome. You can use the latest version. The latest versions are not building ActiveX controls at the moment, but that doesn't affect ActiveX libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants