Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的 VBA 代码中,我使用Cell.Value = Now或更新单元格Cell.Value = Format(Now, "hh:mm:ss")。
Cell.Value = Now
Cell.Value = Format(Now, "hh:mm:ss")
我正在为四个不同的单元格执行此操作。但是,我注意到当其中一个单元格发生更改时,其余时间戳会更改以反映当前时间。在我看来,这些单元格似乎只是对最新时间的引用,而不是单元格更新时间的快照。
无论如何要拍摄时间快照,以便它不会在工作表刷新时改变?
这些单元格只是对最新时间的“参考”,更好的是它们可能是不同的时间。
将时间保存到代码中某个合适位置的变量中,然后在单元格中使用该值。然后你可以控制你现在真正的意思。