Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using COM object in Excel

Status
Not open for further replies.

Herq

Programmer
May 5, 2003
2
US
Hello,

I am a newbie to using VBA, VB, COM, etc, and was wondering if someone can provide me with the basics of using a COM object within excel? I have an excel worksheet that I want to interact with a third party application. They provide a COM api. What do I have to do in excel to use there api? Is there a .dll or something that I have to install in a certain place as well? I'm lost. any help will be greatly appreciated.

 
If you would like to give me more details I may be able to help you. What exactly have you been given and what are you trying to do ?
I have written a complete range of ASCII, numeric, and HEX transmission routines in VBA for communicating with various instruments, from 120 channel temperature recorders to PLCs. I have always done this by sending the command that the instrument requires directly from Excel, and storing the return string and deciphering it in Excel.

Let me know if I can be of help.

Richard
 
tbl,
hi,
I am not sure how to answer this thread, however I am very curious to learn something about how do accomplish such a task in excel or other applications you have built.

thanks

shefea
 
I have sent you an E-mail, but in deference to the readers of this forum I will continue here. It doesnt make much sense sending you information unless you have something concrete in mind. The topic is rather complex, and whatever I sent would not be testable as you would not have the instrument that I wrote the routine for to test the routine. You would just get " No response Received from..." - Not very illuminating.
To start with communicating with any RS232 unit I first decide from the handbook what string the unit requires to give me the desired response.
eg. Unit needs to receive "SEND + CR" to transmit its info.
I send SEND + CR as a string of ASCII numbers and collect the reply from the input buffer. I use a program called Port Monitor to see what I am sending and receiving, otherwise one can not see what's going wrong.

Richard
 
Hey guys,

After playing with it some more, I realized that the COM object somehow magically appears in my object browser and I have access to it. Microsoft. Take the good with the bad. Anyway, that problem is solved as far as me being able to use it. I still have no clue how COM objects get "loaded" to the target machine, and any of the intricacies and pros and cons to using it. However, I can pick up a book for that.

Thanks,
Great site.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top