Trigger VBA action from outside Excel, from the net.

melisen

New Member
Joined
Apr 9, 2013
Messages
13
With this question I am not nessesarily looking for the exact answer. Any hint in what direction to go would be appreciated.

The ideal solution to my problem would be this: I sent a ping to the IP address and it will trigger an VBA script. The message really do not have to have any more information than 1 bit ("do") but it needs to reach the computer fast. REALLY fast.

Is there a way to make VBA listen to pings or have some other program listen to pings and activate the script? Other solutions not involving ping? Latency is of the essence.
 

Some videos you may like

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

ktoon

New Member
Joined
Feb 5, 2015
Messages
30
Could you include more information on what you would like the VBA to do?
 

melisen

New Member
Joined
Apr 9, 2013
Messages
13
I want it to do some VBA stuff :)

Adjust some cells based on calculations of information in other cells and delete content in another cell.
 

ktoon

New Member
Joined
Feb 5, 2015
Messages
30
I would suggest a combination of SSH and VBA - you can install a windows ssh server (google) which will be used to open excel.

Then in your excel document - You put the macro in the module attached to the workbook (in the VBA editor, double click on ThisWorkbook in the properties window) . Call the macro Workbook_Open(), and it will run whenever it opens.
 

melisen

New Member
Joined
Apr 9, 2013
Messages
13

ADVERTISEMENT

Clever suggestion but it would not work for my need. The workbook needs to be open at all times and if not for that, just the time it would take to open it would defeat the purpose.

But besides that thats the direction of solutions I am looking for. Any way to use SSH to trigger a script directly?

Something I forgot: I would need to be able to sent the "trigger message" from a smart phone
 

ktoon

New Member
Joined
Feb 5, 2015
Messages
30
You can use an SSH client from a smartphone to trigger a local batch/vba script if that's what you are asking? Again if you gave more details on what you are trying to do I may be of more assistance.
 

melisen

New Member
Joined
Apr 9, 2013
Messages
13
The VBA really isn´t that advanced.

Here is the gist of it

Code:
Sub bus()
If Worksheets("one").Range("r6") > Worksheets("one").Range("s6") Then
Worksheets("one").Range("t6") = 1
Else
Worksheets("one").Range("t6") = 2
End If


Worksheets("one").Range("v6") = ""
End Sub

R6=1
S6=2
V6=remove this

The code checks if R6 or S6 is largest and deletes the content of cell V6
 

Perpa

Well-known Member
Joined
Dec 18, 2012
Messages
635
I would suggest a combination of SSH and VBA - you can install a windows ssh server (google) which will be used to open excel.

Then in your excel document - You put the macro in the module attached to the workbook (in the VBA editor, double click on ThisWorkbook in the properties window) . Call the macro Workbook_Open(), and it will run whenever it opens.

ktoon,
I was reading this thread and thought you might take a moment when you have completed your discussion here
to have a look at the following thread and provide your thoughts about how to 'automatically Update the Google Calendar'.
I provided information for a non-automatic means to update a Google Calendar... not exactly what the OP asked for.
I thought you might take a look and offer some suggestions regarding the Excel/Google Calendar interaction she is
looking for. This not my area of Excel experience.
Thanks in advance.
Perpa

http://www.mrexcel.com/forum/excel-...asic-applications-update-google-calendar.html
 

Watch MrExcel Video

Forum statistics

Threads
1,127,313
Messages
5,623,929
Members
416,000
Latest member
teabag

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
Top