amorosik
Member
- Local time
- Today, 23:09
- Joined
- Apr 18, 2020
- Messages
- 517
Hello everyone, I follow the post to be able to complete the work started, but not finished yet
The goal is to create a software library capable of communicating with Access to allow it to perform operations not available with the standard features of the development environment
Just to understand, suppose the library is for the management of the rs232 port of the pc
So once loaded in the References, it can be initialized, and used by calling methods and properties
In my case I am following some examples to create the library in C #, and in particular this one
The example basically consists in calling the FiretestEvent() function from vba code and seeing the response that returns, in practice the TestEvent is launched which is the routine defined as 'event'
Trying that example everything works, apart from the fact that the start of the TestEvent is subordinated to a command that starts from vba
I modified the code, inserting a timer on the dll that every 5 seconds starts the TestEvent routine (the last line of the C # code) and simplifying the vba to a minimum
postimg.cc
The dll compiles correctly, in the Access references it loads correctly, the intellisense 'sees' the available classes, and when I start the Access form both the initial ( 5000 Hz) and subsequent beeps (1000 Hz) are heard, so everything seems fine
I would have expected to see the sub in the vba code evtObj_TestEvent () being executed, but it doesn't, the code never goes beyond
To make sure that the code in the library is really executed I inserted some beeps, and actually you can hear both the initial beep (5000,1000) at the form load, and the following ones (1000,100) at 5 seconds from each other, and therefore I am reasonably sure that the TestEvent ("hello ....") line in the dll is executed
The question is: why the routine that receives the events on the vba, the
private Sub evtObj_TestEvent (..) (the one with the breakpoint)
is never called back?
The goal is to create a software library capable of communicating with Access to allow it to perform operations not available with the standard features of the development environment
Just to understand, suppose the library is for the management of the rs232 port of the pc
So once loaded in the References, it can be initialized, and used by calling methods and properties
In my case I am following some examples to create the library in C #, and in particular this one
The example basically consists in calling the FiretestEvent() function from vba code and seeing the response that returns, in practice the TestEvent is launched which is the routine defined as 'event'
Trying that example everything works, apart from the fact that the start of the TestEvent is subordinated to a command that starts from vba
I modified the code, inserting a timer on the dll that every 5 seconds starts the TestEvent routine (the last line of the C # code) and simplifying the vba to a minimum

aaa vba test event — Postimages
The dll compiles correctly, in the Access references it loads correctly, the intellisense 'sees' the available classes, and when I start the Access form both the initial ( 5000 Hz) and subsequent beeps (1000 Hz) are heard, so everything seems fine
I would have expected to see the sub in the vba code evtObj_TestEvent () being executed, but it doesn't, the code never goes beyond
To make sure that the code in the library is really executed I inserted some beeps, and actually you can hear both the initial beep (5000,1000) at the form load, and the following ones (1000,100) at 5 seconds from each other, and therefore I am reasonably sure that the TestEvent ("hello ....") line in the dll is executed
The question is: why the routine that receives the events on the vba, the
private Sub evtObj_TestEvent (..) (the one with the breakpoint)
is never called back?