将文本插入到 Activecell VBA
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/45332799/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-12 12:59:10 来源:igfitidea点击:
Insert Text to Activecell VBA
提问by King
How do i insert a text named "Total" to a selected cell using VBA
如何使用 VBA 将名为“总计”的文本插入选定的单元格
I used
我用了
Activecell.Name="Total"
Selection.Name="Total"
But both of them is not working, is there any other way to do it?
但是两者都不起作用,有没有其他方法可以做到?
回答by ThatOneGuy
The method you are looking for is any of the following:
您正在寻找的方法是以下任何一种:
ActiveCell.Value = "Total"
ActiveCell.Value2 = "Total"
ActiveCell.Value = "Total"
ActiveCell.Value2 = "Total"