S
Sean
Hello all,
Can someone point me to some docs on how to automate
excell via access? I've found some example code that I've
incorporated into my app, but I'm looking at what else I
could do. Here is what I have:
Dim objxlbook As Excel.workbook
Dim objxlapp As Excel.Application
Dim objxlrange As Excel.Range
Dim objsheet As Excel.Worksheet
Set objxlbook = GetObject(fname)
Set objxlapp = objxlbook.Parent
Set objsheet = objxlbook.ActiveSheet
begrange = Day(fndstdte) + 46
endrange = begrange + 50
Set objxlrange = objsheet.Range("A" & begrange & ":AZ" &
endrange)
objxlapp.Visible = True
objxlbook.Windows(1).Visible = True
dne = 0
For i = 1 To UBound(objxlrange.Value, 1)
If objxlrange.Value(i, 3) = "IP:" & serial And
objxlrange.Value(i, 2) = whoami Then
objxlrange.Cells(i, 3).Value = "Complete"
objxlbook.Save
objxlbook.Close
dne = 1
Exit For
End If
Next i
What I'd like to know how to do is to open the sheet in a
read-only mode, or better yet, w/ multiple edit
capability. I found the above code in a book, but it
didn't describe any more detail. I need to know where to
find the docs that describes the above, and all the
options that are available.
Thanks in advance
Sean
BTW, this is win2k, acces and excel 2000
Can someone point me to some docs on how to automate
excell via access? I've found some example code that I've
incorporated into my app, but I'm looking at what else I
could do. Here is what I have:
Dim objxlbook As Excel.workbook
Dim objxlapp As Excel.Application
Dim objxlrange As Excel.Range
Dim objsheet As Excel.Worksheet
Set objxlbook = GetObject(fname)
Set objxlapp = objxlbook.Parent
Set objsheet = objxlbook.ActiveSheet
begrange = Day(fndstdte) + 46
endrange = begrange + 50
Set objxlrange = objsheet.Range("A" & begrange & ":AZ" &
endrange)
objxlapp.Visible = True
objxlbook.Windows(1).Visible = True
dne = 0
For i = 1 To UBound(objxlrange.Value, 1)
If objxlrange.Value(i, 3) = "IP:" & serial And
objxlrange.Value(i, 2) = whoami Then
objxlrange.Cells(i, 3).Value = "Complete"
objxlbook.Save
objxlbook.Close
dne = 1
Exit For
End If
Next i
What I'd like to know how to do is to open the sheet in a
read-only mode, or better yet, w/ multiple edit
capability. I found the above code in a book, but it
didn't describe any more detail. I need to know where to
find the docs that describes the above, and all the
options that are available.
Thanks in advance
Sean
BTW, this is win2k, acces and excel 2000