Hi Folks,
I have an ASP page which opens an Excel document in the background and substitutes in data read from a DB depending on options selected by the user and then prints out the Excel file.
When substituting in the data, I basically loop through the rows in the Excel file adding in data until I hit a certain text string and then I stop.
So what I need to do is when I open the Excel document, I need to check to make sure the string exists before I continue. So I found the following code in the VBScript forum:
However, when I use this in my ASP program nothing happens and the program seems to sit in an infinite loop or something.
Any ideas?
Mighty
I have an ASP page which opens an Excel document in the background and substitutes in data read from a DB depending on options selected by the user and then prints out the Excel file.
When substituting in the data, I basically loop through the rows in the Excel file adding in data until I hit a certain text string and then I stop.
So what I need to do is when I open the Excel document, I need to check to make sure the string exists before I continue. So I found the following code in the VBScript forum:
Code:
Set c = objXL.Worksheets(1).Columns("A:A").Find("aArray(0)")
If c Is Nothing Then
MsgBox "Not Found"
End If
However, when I use this in my ASP program nothing happens and the program seems to sit in an infinite loop or something.
Any ideas?
Mighty