M
Maurice
Hi,
I'm in the process of automating a recordset to XL. The first set works
great. Based on the first set I would like to create another one. But here's
the problem:
The first set I can compare by checking values in designated cells like this:
if .offset(iCount, 1).interior.color=10092543 then
.offset(iCount, 1)=rst("amount")
end if
works great
I know it's terrible to check colors but this is a designated sheet and I'm
not allowed to change anything (nor will the colors be changed also
designated).
For the second set I do have the possibility to change the cellnames so I
decided to check the named range there. I named the first cell "Business".
Now how do I check for the name of that cell from within my Access app.
I've tried: .offset(iCount, 1).name but that only gives me the reference of
$A$9 and I would like to know the named range of the cell being "Business".
If I know the name of the cel I can do the check as follows:
if .offset(iCount,1).?=rst("Category") then
.offset(iCount,1)=rst("Amount") ---place the value here, which works
end if
But how to retrieve the name of the cell. It's driving me nuts!
Any pointers greatly appreciated.
WinXP - Office 2003
I'm in the process of automating a recordset to XL. The first set works
great. Based on the first set I would like to create another one. But here's
the problem:
The first set I can compare by checking values in designated cells like this:
if .offset(iCount, 1).interior.color=10092543 then
.offset(iCount, 1)=rst("amount")
end if
works great
I know it's terrible to check colors but this is a designated sheet and I'm
not allowed to change anything (nor will the colors be changed also
designated).
For the second set I do have the possibility to change the cellnames so I
decided to check the named range there. I named the first cell "Business".
Now how do I check for the name of that cell from within my Access app.
I've tried: .offset(iCount, 1).name but that only gives me the reference of
$A$9 and I would like to know the named range of the cell being "Business".
If I know the name of the cel I can do the check as follows:
if .offset(iCount,1).?=rst("Category") then
.offset(iCount,1)=rst("Amount") ---place the value here, which works
end if
But how to retrieve the name of the cell. It's driving me nuts!
Any pointers greatly appreciated.
WinXP - Office 2003