# Solved: set up a directory



## fatalbert (Oct 23, 2008)

I need help to set up a directory and i have some code that needs to be put into a module so that my program can sms my mobile when a occurance happens in my excel workbook


----------



## draceplace (Jun 8, 2001)

I've written an app that will send an email from a script but I don't think you can SMS without a 3rd party to relay it. You would send the email to the 3rd party which would then sms to your phone.

Like here http://www.sms2email.com/site/howitworks4.php


----------



## fatalbert (Oct 23, 2008)

thanks for the reply draceplace I have the third party when I asked for help setting up they sent me the following but I am not that skilled enough yet to understand everything.


----------



## draceplace (Jun 8, 2001)

Assuming your running XP or the likes. I would Extract all the files from both zips into a new directory call c:\RedO (or whatever). Then register the dll. command promt or "Run Line" C;\RedO>regsrv32 RedoxygenCOM.dll

Open VBsampleUsingCOM.bas (with Notepad) and save it as SMS_test.vbs. Remove the Private Sub and End Sub lines. Change the a account information save it and double click it and see what happens.


----------



## fatalbert (Oct 23, 2008)

I made a new folder in c drive called it RedOxygen.
I can see you rolling your eyes now  but what do you mean by Then register the dll. command promt or "Run Line" C;\RedO>regsrv32 RedoxygenCOM.dll


----------



## draceplace (Jun 8, 2001)

Click the Start menu, on the bottom right there is a Run... click that. Paste this:

C:\RedOxygen>regsrv32 RedoxygenCOM.dll

Then Click OK


----------



## fatalbert (Oct 23, 2008)

No go i get the error cant find it,but i see the dll file in that folder the only thing missing in the address is regsrv32. If i put the addressin without this i get error not accessible name or syntax incorrect


----------



## draceplace (Jun 8, 2001)

My Bad! the correct thing is regsvr32 not regSRV32


----------



## fatalbert (Oct 23, 2008)

No Luck same error
C:\RedOxygen>regsvr32 RedoxygenCOM.dll


----------



## draceplace (Jun 8, 2001)

In Run lets try 

regsvr32 c:\RedOxygen\redoxygenCOM.dll


----------



## fatalbert (Oct 23, 2008)

Yesss that said it succeeded, Now what is ment by SMS_test.vbs?
Does that mean save as a module

Open VBsampleUsingCOM.bas (with Notepad) and save it as SMS_test.vbs.


----------



## draceplace (Jun 8, 2001)

Just open note pad and paste this code, put in the correct account info, save...and rename the file to SMS_test.vbs. Then double click!!

Dim sms As Object

Set sms = CreateObject("REDOXYGENCOM.SMSInterface")

With sms
.Email = "[email protected]"
.AccountID = "CI00001234"
.Password = "MyPassword"
End With
Wscript.Echo "Testing SMS: " 

sms.SendSMSMessage "61417999999", "Hello from VB COM object"


----------



## fatalbert (Oct 23, 2008)

Expected end of statement error


----------



## draceplace (Jun 8, 2001)

It should tell us what line and position this error is on.


----------



## fatalbert (Oct 23, 2008)

Line 1 
Char 9


----------



## draceplace (Jun 8, 2001)

Right click on SMS_TEST.vbs and select edit.
Change First line to single quote (makes it a comment) 'Dim sms AS
Save, close then dbl click again


----------



## fatalbert (Oct 23, 2008)

we are progressing well mesaage said testing sms, been a five minutes nothing on cellphone yet.
So how would i get that to send a message to me automatically from a excell worksheet,say when cell a1 changes to "go" send what is written in cell a2


----------



## draceplace (Jun 8, 2001)

did you click 'OK' after the 'testing message? It won't execute the next step till you do..

If this doesn't fly you should start a new post in Networking and explain where you are. There should be some support availble from RedOxy available? Like 'did my message get to you'? Can you see the email account there?

The next step is a little tougher. I'm thinking a macro in excel could kick this off or even run the script, but I'm not real experinced in excel macros. And when would it know to check this? You don't want to sms every 5 minutes just because condition is True? The presence of a file in a folder with the text your looking for would be easier for me to understand a process for. You then delete the file and begin looking for it again.

Also this RedOxy would have to be on any machine that you wanted this to happen on.


----------



## fatalbert (Oct 23, 2008)

The email address xxxxxxxxxx.com is attempting to use the Red Alert service, however, the user has failed authentication. Red Alert messages must be sent via either IP authentication (IP address and email address), or password authentication (authorisation code, and email address). For further information, see the Red Alert User Guide (available under the Support -> Downloads section of the Web Administrator at http://www.redoxygen.net). If you are using IP authentication, make sure you have registered the correct IP address and that you are sending via the registered IP address. Contact Red Oxygen Support if you need to register a new IP address ([email protected]). Also check that you are sending from a registered email address. If not, contact your Systems Administrator to register your email address. If you are using password authentication, make sure you that you are following the correct format set out in the Red Alert User Guide, that you are using the correct authorisation code, and that you both have a password set under your account and are using that password in your messages. To set a password, contact your Systems Administrator or logon to the Web Administrator and edit your user details. Also check that you are sending from a registered email address. If not, contact your Systems Administrator to register your email address.
that shouldnt be too hard to fix.the excel problem as yu say may be harder,the condition would stay true for just over 1 minute then the web query refreshes ,I have some code that plays a wav file on change so maybe it could run off that


----------



## draceplace (Jun 8, 2001)

Lost the message I typed here while ago...

Anyway looks like the SMS test is a success. Just need to get account configured to see if it will eventually get to your phone.

The code that runs the .wav file sound promising. Do you need to capture a specific message?

You want to comment out the Wscript.Echo line when you go production with this. I put it in there so we could tell something was happening. You can use it to test other things like is the message text getting to this code....


----------



## fatalbert (Oct 23, 2008)

Yes the message will be different for evey send buit i can make it available in the one cell and after the web query refreshes it will disapair.
The Wscript.Echo line will be great will find plenty of uses for it for my trial and error coding in the future


----------



## fatalbert (Oct 23, 2008)

Have got my project up and testing now thanks very very much too you draceplace.


----------



## draceplace (Jun 8, 2001)

Thats Great! I'll add RedOxy to my resume!


----------

