vba - Getting a date value from first column and first row of a table -
i tried getting date value 1st column , 1st row of table, this:
dim objstartdate date objstartdate = activesheet.listobjects("table1").listcolumns("date").listrows(1).value
but got error message:
run-time error '438': object doesn't back upwards property or method
what's right way value(s) table?
i decided post gserg's , comment reply help others might having same issue.
from gserg's comment:
"if have list object, then" - gserg
activesheet.listobjects("table1").listcolumns("date").range.cells(2).value
you can drop cells property , straight access info using range.
activesheet.listobjects("table1").listcolumns("date").range(2).value
or can seek i've commented using range object.
activesheet.range("table1[date]")(1).value
again assuming have listobject named table1 existing date column. hth's have same issue.
vba
No comments:
Post a Comment