Browser security settings may be hampering your attempts. To get it to
work, the setting you'll most likely need to adjust can be found on the
Internet Options dialog under the Tools dropdown menu in Internet Explorer.
Go to the security tab. With local Intranet selected (assuming this is an
intranet app), click the "Customize Level." button. Find the setting titled
"Initialize and script ActiveX controls not marked as safe" and change the
selection to either "enable" or "prompt."

--
I hope this helps,
Steve C. Orr, MCSD
[url]http://Steve.Orr.net[/url]


"Mark Brouwers" <M.Brouwers@LAG.be> wrote in message
news:OaJ0hiDTDHA.2280@TK2MSFTNGP12.phx.gbl...
> Hi,
> I'm trying to execute some vbscript to open an excel object. I'm using
> following code on a button1_click handler :
>
> string script=null;
> script += "<script language=vbscript> \n";
> script +="msgbox(\"Start script!\") \n";
> script += "dim objWord \n";
> script += "set app = CreateObject(\"Excel.Application\") \n";
> script += "msgbox(\"Object created\") \n";
> script += "app.Visible = true \n";
> script += "dim wb \n";
> script += "set wb = app.workbooks.add \n";
> script += "</script> ";
> if(!this.IsStartupScriptRegistered("OnClick"))
> this.RegisterStartupScript("OpenExcel", script);
>
> As soon as the button is pressed and the browser has received al of it
data,
> the first messagebox appears but there is no excel object created and the
> seconf messagebox does not appear.
> What am I doing wrong?
> Anyone to give me a hint ?
>
> TIA,
> Mark
>
>