IT gives error
object value set to nothing what is wrong
MyScreen.Area(1,10,1,14).Value = Trim(aSheet.Cells(4, "e"))
Printable View
IT gives error
object value set to nothing what is wrong
MyScreen.Area(1,10,1,14).Value = Trim(aSheet.Cells(4, "e"))
i have in cell 4 e has ABCD BUT SPACES BEFORE A AND AFTER.
I TRIED BELOW THE CODE
BUT STILL I HGOT object value set to nothing
Westconn
why it is coming error in the
MyScreen.Area(1,10,1,14).Value = Trim(aSheet.Cells(4, "e"))
what is the problem in that
before this code i have len statiment
Hi there.Quote:
Originally Posted by india123
when referencing cells in excel from VBA there are two conventions -
asheet.cells(4,5).value
or
asheet.range("e4").value
You are mixing the two conventions and this is probably the reason it doesn't work.
hope this helps
Cheers
Still the same problem it is not resolved
MyScreen.Area(1,10,1,5).Value = aSheet.range("e4").value