ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  RealTimeDemo.frm in VBA
Posted by Luiz on Sep-12-2021 07:57
Attachments:
Hi.

I'm having the message: "The form class contained in the 'frmRealTimeDemo.frm' is not supported in VBE. The file can't be loaded." when I try to import this file to VBA.

Is there any solution for this problem?

Thanks in advance!

Luiz
Error.JPG

  Re: RealTimeDemo.frm in VBA
Posted by Peter Kwan on Sep-14-2021 16:59
Hi Luiz,

The frmRealTimeDemo.frm sample code that comes with ChartDirector for ASP/COM/VB are for VB6. VBA is a different environment from VB6. If you are interested, I can port this Real Time Chart example to VBA. It should be available within 1 day.

Regards
Peter Kwan

  Re: RealTimeDemo.frm in VBA
Posted by Luiz on Sep-14-2021 19:01
Thanks Peter for your reply and yes, I'm interested in Real Time Chart example to VBA.

Thanks in advance,


Luiz

  Re: RealTimeDemo.frm in VBA
Posted by Peter Kwan on Sep-15-2021 21:39
Hi Luiz,

I have just created an example as follows:

https://www.advsofteng.com/support/cd_excel_realtime_demo2.zip

The port takes longer than what I expect because there is no timer control in VBA. (The VB6 realtime chart examples use timers to generate random realtime data and to update the chart.) I end up using the Application.OnTime method in VBA, but the shortest time the it can support is 1 second. So the VBA sample code only supports at 1 chart per second. If you need to use a faster update rate, we may need use Win32 API "SetTimer" directly.

Regards
Peter Kwan

  Re: RealTimeDemo.frm in VBA
Posted by Luiz on Sep-27-2021 18:47
Thanks Peter, it worked as I expected! :)