这两个问题归结起来都是如何引用/指向单元格的问题.
其实这个偶也不懂,, 不过用关键字cell reference 搜一下office自带的visual basic help就有答案了
1
改成比如
Quote:
What:=[a2]
2
这个是Referring to Cells Relative to Other Cells 这个主题里的, 用比如activecell.offset(row,col)来引用.
[edit]
activecell can be substituted by any legal cell reference, e.g.,
Quote:
sub foo()
[a5].offset(10,0).value="bar"
end sub
this effectively sets [a15] as string "bar". notice that ".Value", being the default "Property", can be omitted. that's why in (1) we only need [a2] but not [a2].value. This is a common practice of all VB implementations (VB, VBA, VBS, etc)
[ 此贴被galilette在2006-03-24 13:29重新编辑 ]