how do i check for that value?
tried this
xlsheet.cells("1:1") = rowvalue
If rowvalue = "code" Then
GoTo contin
Else
GoTo Err_addl_update_Click
End If
contin:
rowvalue is defined as a string
get error msg that not valid construct
thanks for your help
Aren't Excel cells indexed by letters in the columns, not numbers? Try "A:1".
If you're running this code in Excel, please post your questions in an Excel
newsgroup.
John W. Vinson [MVP]
i have done something like this because i had to insert a row
xlsheet.rows("1:1").Insert
xlsheet.cells(1, 1) = "aaaa"
therefore i thought i could do
if xlsheet.rows ("1:1").value = "code" then
do stuff
>that did not work
>
>i have done something like this because i had to insert a row
>xlsheet.rows("1:1").Insert
>xlsheet.cells(1, 1) = "aaaa"
>
>therefore i thought i could do
> if xlsheet.rows ("1:1").value = "code" then
> do stuff
>
I'd ask in an Excel newsgroup, or repost under a new header - this is Excel
syntax with which I am not familiar.
John W. Vinson [MVP]
To save launching Excel, you can do it like this (watch out for line
wrapping in the Set R... statement:
Dim R As DAO.Recordset
Set R = CurrentDB.OpenRecordset("SELECT F1 FROM [Excel8.0;" _
& "HDR=No;database=C:\folder\XXX.xls;].[Sheet1$A1:A1];")
'The value you want is now in R.Fields(0).Value
...
R.Close
On Wed, 14 Nov 2007 12:18:00 -0800, jnewl
<jn...@discussions.microsoft.com> wrote:
--
John Nurick - Access MVP