CreateObject("Excel","//server"), MsgBox output 
Author Message
 CreateObject("Excel","//server"), MsgBox output

Assuming an excel-file exists on a server (192.168.1.1) containing following
macro:

    Sub doSomething()
        'code for connecting to database
        'code for requests to the db

        MsgBox "an error occured while requesting the base !"  <-- key issue

        'code for filling up worksheets with the results.
    End Sub

When locally executing the macro the MsgBox pops up, ok.

Now i want to call the macro from an remote-host out of an html-file.

<HTML>
    [...]
    <SCRIPT Language=VBScript>
       Dim var1
       Set var1 = CreateObject("Excel.Application", "192.168.1.1")
       var1.Workbooks.Open "excelFile"
       var1.Run "excelFile!doSomething"
       var1.Visible = TRUE
    </SCRIPT>
    [...]
</HTML>

Then, providing the correct security preferences, on 192.168.1.1 excel is
started and the execution of "doSomething" begins.

PROBLEM: When execution arrives at the "MsgBox"-command, neither on the
server nor on the client a MessageBox pops up and the macro hangs.

Is there an possibility to "turn around" the output of an macro to the
client, when it is executed remotely ?

Thanks in advance,

Kai.




Tue, 04 Feb 2003 03:00:00 GMT  
 CreateObject("Excel","//server"), MsgBox output
Can you create a remote COM (DCOM) object in HTML ? How do you
set the client IE preferences ?


Quote:
> Assuming an excel-file exists on a server (192.168.1.1) containing
following
> macro:

>     Sub doSomething()
>         'code for connecting to database
>         'code for requests to the db

>         MsgBox "an error occured while requesting the base !"  <-- key
issue

>         'code for filling up worksheets with the results.
>     End Sub

> When locally executing the macro the MsgBox pops up, ok.

> Now i want to call the macro from an remote-host out of an html-file.

> <HTML>
>     [...]
>     <SCRIPT Language=VBScript>
>        Dim var1
>        Set var1 = CreateObject("Excel.Application", "192.168.1.1")
>        var1.Workbooks.Open "excelFile"
>        var1.Run "excelFile!doSomething"
>        var1.Visible = TRUE
>     </SCRIPT>
>     [...]
> </HTML>

> Then, providing the correct security preferences, on 192.168.1.1 excel is
> started and the execution of "doSomething" begins.

> PROBLEM: When execution arrives at the "MsgBox"-command, neither on the
> server nor on the client a MessageBox pops up and the macro hangs.

> Is there an possibility to "turn around" the output of an macro to the
> client, when it is executed remotely ?

> Thanks in advance,

> Kai.





Tue, 04 Feb 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. CreateObject("Excel","//server"), MsgBox output

2. Server.CreateObject("Excel.Application")

3. GetObject("","InternetExplorer.Application") fails in Excel VBA

4. GetObject("","InternetExplorer.Application") fails in Excel VBA

5. *"*-.,._,.-*"* I"LL TRADE VISUAL C++ FOR VBASIC *"*-.,_,.-*"*

6. CreateObject("Excel.Sheet")

7. CreateObject("Excel.Application") Error

8. CreateObject("Excel.Application")

9. CreateObject("Excel.Sheet")

10. CreateObject("Excel.Application") problem

11. CreateObject("Excel.Application")

12. CreateObject("Excel.Application")

 

 
Powered by phpBB® Forum Software