Excel Window Focus

I have a problem with an Excel file not keeping the focus when launched from Notes. I understand this has been fixed in 7.0.3, but the users here have 6.5.4. I looked at the fix from the Lotus Geek site which works with the QueryOpen event in a form, but the person that designed this database used the “About Database” document for all these buttons so there is no QueryOpen event. Is there any other way to keep the Excel focus? I’ve included some of the button script below (refers to 123 several times; ignore it, I’m rewritting the files to Excel). Thanks for anything!plat = sess.Platform

Dim dirstr As String

dirstr = Dir$("C:\lotus\work\123" & csvdata & “.csv”)

If dirstr <> "" Then

	'read the first line of the csv file and get the date.

	'if the first line is not TOTALS, then get the second value, if it is TOTALS then get the 3rd value

	Dim fileNum As Integer

	fileNum% = Freefile()

	Open "C:\lotus\work\123\" & csvdata & ".csv" For Input As FileNum%

	

	Line Input #1,fileLine$   'reads the first line

	pos = Instr(FileLine$,",")

	If pos = 0 Then

		totInd = ""

	Else

		totInd = Left(fileLine$,pos-1)				

	End If

	Dim tempDt As String

	If Trim(totInd) <> "TOTALS" And Trim(totInd) <> "TOTAL" Then

		tempDt = Strtoken(fileLine$,",",2)

		Set fileWeDt = New NotesDateTime(tempDt)

	Else

		tempDt = Strtoken(fileLine$,",",3)

		Set fileWeDt = New NotesDateTime(tempDt)

	End If		

End If

'close the file

Close fileNum%     

Dim noData As Boolean

If dirstr = "" Then

	noData = True

Elseif dirstr <> "" And weDt.DateOnly <> fileWeDt.dateOnly Then 'change this to check for 

	If karenDt.DateOnly <> fileWeDt.DateOnly Then  'now I'm checking 3/3/07 and 3/10/07

		noData = True

	End If

End If



If noData Then

	' ***There's no existing data file, or there's old data on the hard drive***

	Set doc = view.GetFirstDocument

	If doc Is Nothing Then

		Msgbox "Transport documents are missing. Please contact the help desk.",0+16,"Missing Transport Documents"

		Exit Sub		

	End If

	Do While Not doc Is Nothing

		If Ucase$(doc.ReportID(0)) = Ucase$(csvdata) Then     

			docFound = "Y"

			Set eo = doc.GetAttachment(csvdata & ".csv")

			If doc.HasEmbedded And doc.RawCount(0) = "0" Then

				

                '**** Copy the data file  ****

					If Ucase$(eo.Source) = Ucase$(csvdata & ".csv") Then

						Call eo.ExtractFile(FL_PATH & csvdata & ".csv")

						Call eo.ExtractFile(FL_PATH & csvdata & "raw.csv")

						doc.RawCount = "1"

						Call doc.Save(True, False)

						Call ws.EditDocument(False, doc123)

					End If

					

			Else

				If Ucase$(eo.Source) = Ucase$(csvdata & ".csv") Then                    

					Call eo.ExtractFile(FL_PATH & csvdata & ".csv")

					Call ws.EditDocument(False, doc123)

				End If

				

			Exit Sub

		End If

		Set doc = view.GetNextDocument(doc)

	Loop

	If docFound <> "Y" Then 

		Msgbox "Transport document is missing. Please contact the help desk.",0+16,"Missing Transport Document"

		Exit Sub

	End If

Else

	'get a handle to the main doc

	Set doc = view.GetFirstDocument

	If doc Is Nothing Then

		Msgbox "Transport documents are missing. Please contact the help desk.",0+16,"Missing Transport Documents"

		Exit Sub