Listening to Events with Script

Status
Not open for further replies.

junfanbl

Member
Joined
Feb 18, 2016
Messages
18
Programming Experience
1-3
Hey everyone, I am curious to know whether or not it is possible to use a script to listen to listen for an event. To be more specific I am trying to monitor Excel for certain events to take place, and when they do I need to write data to a port over a remote server. My first thought is to run the script using a Do While loop to check for events. Running the script in a loop in the background shouldn't be that much of a performance hog (at least I don't think) because I'm running a beast of a machine. Plus the script is running on it's own thread so I'm hoping that making it loop in the background won't have performance issues. (If you think otherwise please let me know).

The other issue I'm concerned with however is that while the script "listens" for an event in Excel by handling the application object;

Code:
  Dim objExcel as Object = ("Excel.Application")
Using that Instance of Excel (to initiate the event) might make the script crash. I have experienced this before while using scripts to handle processing in Excel where while it was writing data to the sheet I couldn't click in a cell otherwise the script would crash.

I can't compile executable files or use VSTO unfortunately because of work restrictions. I am however given permission to run a certain scripting environment.
 

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,411
Location
Norway
Programming Experience
10+
This question regards only VBA, as such you have to ask in a VBA forum because this place is for VB.Net development only. Thread is therefore closed.
 
Status
Not open for further replies.
Top Bottom