How To change message

Hi all,

while uploading data from excel sheet through agent in notes client environment i got a default message at the end " insatnce member CLOSE does not exist" rather than this i want a message will display something like “Data has been uploaded successfully” can anyone give idea how to do this .

code for agent is :

Sub initialize

Dim s As New NotesSession





Set curdb=s.CurrentDatabase



Set db=s.GetDatabase(curdb.Server,"applications/name.nsf")



Set xl = createobject("excel.application")

xl.visible=True

Set xlapp=xl.workbooks.open("c:\Book.xls")

Set xlsheet=xlapp.worksheets("Sheet1")

xlsheet.activate



For i=1 To 117

	Set doc=db.CreateDocument

	doc.form="formname"

	

			doc.field1name=Trim(Cstr(xlsheet.cells(i,1).value))

doc.field2name=Trim(Cstr(xlsheet.cells(i,2).value))

doc.field3name=Trim(Cstr(xlsheet.cells(i,3).value))

	

	Call doc.Save(True,True)

Next

xlsheet.close

End Sub

Subject: How To change message

’ replace xlsheet.close with the following code xlapp.Close False ’ Close Workbook

xl.Quit 'Close Excel

Set xl = Nothing 'Free the memory that we'd used

Msgbox "Data has been uploaded successfully"	' or alert message 

Exit Sub