- The site for all your DTS needs.
"prathi" <anonymous@discussions.microsoft.com> wrote in message
news:444C6A92-D8AB-4730-9F0F-04EFCC398FEF@microsoft.com...
> I tried it but now I have a runtime error. Where do I put
> Application.DisplayAlerts=False ? Do I have to put it after
>
> set xlapp = createobject("Excel.Application").
>
> Thanks Prathi
>
> ----- Allan Mitchell wrote: -----
>
> What about
>
> Application.DisplayAlerts=False
>
> --
>
> ----------------------------
> Allan Mitchell (Microsoft SQL Server MVP)
> MCSE,MCDBA
>
www.SQLDTS.com > I support PASS - the definitive, global community
> for SQL Server professionals -
http://www.sqlpass.org >
>
>
> "prathi" <anonymous@discussions.microsoft.com> wrote in message
> news:264BF7A9-FAD7-4CCB-ABFC-6C0C20D13529@microsoft.com...
> > Hi,
> >> I am trying to refresh an excel spreadsheet from sqlserver.
> > 1. I have setup the excel spreadsheet with external data source to
the
> sqlserver.
> > 2. I have an active x task as follows
> >
'**********************************************************************
> > ' Visual Basic ActiveX Script
> >
'************************************************************************
> > Function Main()
> >> dim xlapp
> > dim xlbooks
> > dim xlsheet
> > dim SheetName
> > set xlapp = createobject("Excel.Application")
> > set xlbooks = getobject("\\marketing_list$\prathi.xls")
> > SheetName = "sheet1"
> > set xlsheet = xlbooks.worksheets(Sheetname)
> > xlbooks.RefreshAll
> > xlbooks.Save
> > xlapp.quit
> >> Main = DTSTaskExecResult_Success
> > End Function
> >> 3. I get this message, "This action will cancel a pending refresh
data
> command continue ?" (It is an excel message), when I press continue,
the
> active x script continues. I don't want the excel message to show .
What
> do I need to do so that the excel message does not show up!!
> >> I would really appreciate any help with this.
> >> Thanks Prathi
> >