Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
address in VBA
hi,
is there any difference between these two expressions:? target.address=range("D1").address and target.address(false,false)=range("D1").address thanx |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
address in VBA
Yes.
If you're using: if target.address(false,false) = range("D1").address then msgbox "true" else msgbox "False" end if You'll never see the True msgbox. Try this in a test macro: with range("D1") msgbox .address & vblf & .address(false,false) end with And you'll see the difference. peyman wrote: hi, is there any difference between these two expressions:? target.address=range("D1").address and target.address(false,false)=range("D1").address thanx -- Dave Peterson |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
address in VBA
Yes. The second formula will always return False, since .address will by
default return an absolute address. This is equivalent: target.Address(False, False) = Range("D1").Address(False, False) but of course, since you know the cell reference you could just as easily use target.Address(False, False) = "D1" In article , peyman wrote: hi, is there any difference between these two expressions:? target.address=range("D1").address and target.address(false,false)=range("D1").address thanx |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
address in VBA
tahnx Dave.
"Dave Peterson" wrote: Yes. If you're using: if target.address(false,false) = range("D1").address then msgbox "true" else msgbox "False" end if You'll never see the True msgbox. Try this in a test macro: with range("D1") msgbox .address & vblf & .address(false,false) end with And you'll see the difference. peyman wrote: hi, is there any difference between these two expressions:? target.address=range("D1").address and target.address(false,false)=range("D1").address thanx -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I avoid excel change absolute address to relative address | Excel Discussion (Misc queries) | |||
what is difference between absolute address and relative address? | Excel Discussion (Misc queries) | |||
long address list, name-address-city, listed vertically, how do y. | Excel Discussion (Misc queries) | |||
How do I import Office address book to Outlook Express address bo. | Excel Discussion (Misc queries) | |||
Using =address to provide address location for =average | Excel Worksheet Functions |