Controlling Excel from VB 6.0

hatman

Well-known Member
Joined
Apr 8, 2005
Messages
2,664
I am in the developement mode of making software to display live telemetry from the Space Station on a series of screens in VB 6.0. In the process, I am also building a utility in VB 6.0 to log user selected parameters to an instance of Excel, with teh ability to plot the data on the fly. I am building all of teh controls with the VB Application, so the Excel nstance is completely automated. As far as that goes, it's pretty straight-forward from a technical point of view. As part of my initial debugging, I wondered what would happen if a user tried to use the native Excel controls to change formatting, or other settings. While it does not cause a crash, if the user keeps any of the Excel dialogs open for several successive data writes (they happen on 1-second intervals) it does cause a hang in the VB application, with a dialog stating that a remote application is not responding, do you want to abort or retry. As a first pass, I'm going to try just telling users NOT to try manipulating Excel directly. I'm just wondering if anyone has encountered this and has any advice for a more stable solution. I'm not even sure if it's better to try intercepting the user inputs to the Excel window, or if it's better to allow the error, but handle it more gracefully. Any thoughts would be appreciated.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Do you actually want the users messing with the workbook? If not, I would set the application's Interactive property to False.
 
Do you actually want the users messing with the workbook? If not, I would set the application's Interactive property to False.


I didn't know such a thing existed. I think that will be PERFECT. Looks like all I need to do is toggle that setting back to true when teh user hits the "Stop Logging" button on teh VB app, and then they can manipulate the Excel app as needed once the connection has been severed by VB.

Thanx much!
 

Forum statistics

Threads
1,222,636
Messages
6,167,223
Members
452,104
Latest member
jadethejade

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top