lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
If I want to change a cell value then I can write this code
but I can also do that by writing this code
I see both give the same result. I do not see any advantage of one on another except the second one is easier to type. Which one is the right one? is there any cases I can only use one over the other? thank you so much
If I want to change a cell value then I can write this code
Code:
sub abc[INDENT]thisworkbook.activesheet.cells(1,1).value =10[/INDENT]
end sub
but I can also do that by writing this code
Code:
sub abc[INDENT]cells(1,1).value =10[/INDENT]
end sub
I see both give the same result. I do not see any advantage of one on another except the second one is easier to type. Which one is the right one? is there any cases I can only use one over the other? thank you so much