Hi,<BR> I had created a dll in which I am opening an excel file and creating a chart AS AN OBJECT in that excel file. When I am calling the DLL from ASP Page, Excel Instances are getting created. <BR><BR>I am sending the Code For Both ASP Page As well as DLL Code. Please Review it and send me the solution ASAP.<BR><BR>DLL CODE STARTS HERE <BR><BR>PROJECT NAME FOR THE DLL : ss15Project1<BR>CLASS NAME FOR THE DLL : ss15Class1<BR><BR><BR>Public Function SampleFunc() As String<BR> <BR> Dim objXl As New Excel.Application<BR> Dim ObjRange As Excel.Range<BR> Dim ObjChart As Excel.Chart<BR> Dim ObjLegend As Excel.Legend<BR> Dim ObjAxis As Excel.Axis<BR> Dim x As Integer<BR> Dim str As String<BR> On Error GoTo ssend<BR> x = 0<BR> objXl.Workbooks.Open ("E:Sample.xls")<BR> Set ObjRange = objXl.Range("B41:D48")<BR> ObjRange.Select<BR> objXl.Charts.Add<BR> x = 20<BR> ActiveChart.ChartType = xlBarClustered<BR> x = 21<BR> ActiveChart.SetSourceData _ Source:=Sheets("Priority _<BR>Chart").Range("B41:D48"), PlotBy:= _<BR> xlColumns<BR> x = 22<BR> ActiveChart.Location _ Where:=xlLocationAsObject, Name:="Priority _ Chart"<BR> x = 1<BR> Set ObjChart = Worksheets("Priority _ Chart").ChartObjects(1).Chart<BR><BR> ObjChart.HasLegend = True<BR> x = 2<BR> Set ObjLegend = ObjChart.Legend<BR> x = 12<BR> ObjLegend.Position = xlBottom<BR> x = 11<BR> Set ObjAxis = ObjChart.Axes(xlCategory)<BR> x = 13<BR> With ObjAxis.Border<BR> .Weight = xlHairline<BR> .LineStyle = xlAutomatic<BR> End With<BR> With ObjAxis<BR> .MajorTickMark = xlOutside<BR> .MinorTickMark = xlNone<BR> .TickLabelPosition = xlLow<BR> End With<BR><BR>objXl.ActiveSheet.ChartObjects(1).Left = 48<BR>objXl.ActiveSheet.ChartObjects(1).Top = 520<BR>objXl.ActiveSheet.ChartObjects(1).Width = 600<BR>objXl.ActiveWindow.Visible = False<BR><BR> With ObjChart.PlotArea.Interior<BR> .ColorIndex = 2<BR> .PatternColorIndex = 1<BR> .Pattern = xlSolid<BR> End With<BR> x = 9<BR> Set ObjRange = Nothing<BR> Set ObjChart = Nothing<BR> Set ObjLegend = Nothing<BR> Set ObjAxis = Nothing<BR> x = 6<BR> str = Format(Time, "hhmmss")<BR> <BR> Call objXl.ActiveWorkbook.Close(True, "E:Sample" & str & ".xls", True)<BR> x = 7<BR> objXl.Quit<BR> x = 8<BR> Set objXl = Nothing<BR> x = 9<BR> SampleFunc = "Success" & x<BR> Exit Function<BR> <BR>ssend:<BR> Call objXl.ActiveWorkbook.Close(False)<BR> objXl.Quit<BR> Set objXl = Nothing<BR> SampleFunc = "Error" & Err.Description & " @ " & Err.Number & " @ " & " X: " & x & " str: " & str<BR>End Function<BR><BR><BR><BR><BR>ASP PAGE CODE STARTS HERE <BR>&#060;%@ Language=VBScript %&#062;<BR>&#060;%<BR>Set obj1 = Server.CreateObject("ss15Project1.ss15Class1")<BR> str = obj1.SampleFunc()<BR>Response.Write str<BR>Set obj1 = Nothing<BR>%&#062;<BR><BR><BR>CAN ANYONE, PLEASE SEND ME THE SOLUTION FOR NOT TO GET INSTANCES CREATED WHILE CALLING THIS DLL FROM THE ASP PAGE