Runtime error 1004
DataSheet.Cells.Offset(intRow, intCol)
looks odd. I would expect something more like
strPName = DataSheet.Cells(1).Offset(intRow, intCol)
"Cells" refers to the entire sheet.
Tim
"Daniel" wrote in message
...
Hi all,
Have anyone experienced the following situation in VBA.
Run time error:1004
Application-defined / object-defined error
while run at the statement,
dim DataSheet as worksheet
Set DataSheet = ThisWorkbook.Sheets("Data")
strPName = DataSheet.Cells.Offset(intRow, intCol)
Have any ideas?
Any help will be appreciated.
Rgrds,
Daniel
|