|
-
Sep 11th, 2000, 08:53 PM
#1
Thread Starter
Addicted Member
CreateObject function can be used to activate applications on a server. Has anyone successfully done this?
-
Sep 11th, 2000, 11:23 PM
#2
Hyperactive Member
Yes
All it means is that you can use VB to start an ActiveX application and thereby "remote control" it as it were.
I use it in one app to create Word documents once the user has finished capturing and annotating video images.
You'll find that many of the Microsoft apps are available as activeX servers.
If you want to use activeX servers on another system (in case this is what you mean by "server") then this is also possible but alas I have not had need to try it. This ought to be just the same as if it is on your computer because as I understand it, this is what the COM provides.
Let me know if you want more info on running word from VB code (no controls).
Regards
Paul Lewis
-
Sep 12th, 2000, 06:31 AM
#3
You can start a server application on a remote computer using CreateObject. Just pass the computer name as the second argument.
You have do have DCOM98 installed though.
You can never however show the application that you have started this way. So the Visible property has no effect.
-
Sep 13th, 2000, 12:08 AM
#4
Thread Starter
Addicted Member
Thanks both.
Can you pls give me sample code which demonstrates how to do this?
-
Sep 13th, 2000, 12:53 AM
#5
Code:
Dim xl As Object 'or Excel.Application if you have a reference
Set xl = CreateObject("Excel.Application", "RemoteComputerName")
-
Sep 13th, 2000, 05:20 AM
#6
Thread Starter
Addicted Member
Can the RemoteComputerName be the name of any computer in the network?
-
Sep 14th, 2000, 04:30 AM
#7
Yes as long as it got DCOM installed.
-
Sep 14th, 2000, 06:41 AM
#8
Thread Starter
Addicted Member
Tell me more about DCOM. How do I get it?
-
Sep 14th, 2000, 08:47 AM
#9
DCOM is included in WinNT, Win98 and Win2K. If you have Win95 you should have it anyway because Visual Studio won't install without it.
Otherwise you can download from Microsoft at:
http://www.microsoft.com/com/resources/downloads.asp
Good luck!
-
Sep 14th, 2000, 10:20 AM
#10
Thread Starter
Addicted Member
It does not work. An error occurs:
Run-time error '462'
The remote server machine does not exist or is unavailable
-
Sep 14th, 2000, 10:28 AM
#11
Try
Code:
Set xl = CreateObject("Excel.Application", "\\RemoteComputerName")
If the remote computer isn't a WinNT or Win2000 machine someone must log on the computer for it to work!
-
Sep 14th, 2000, 10:41 AM
#12
Thread Starter
Addicted Member
Still no good.
But it works when RemoteComputerName = the name of the local computer name.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|