Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/vba/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Excel 按钮在选定单元格中插入文本_Excel_Vba - Fatal编程技术网

Excel 按钮在选定单元格中插入文本

Excel 按钮在选定单元格中插入文本,excel,vba,Excel,Vba,我需要一个按钮,当按下该按钮时,它会在指定的A1:C5范围内的选定单元格或选定单元格中插入一个文本,比如说:“开”。尝试: Sub Button1_Click() Intersect(Selection, Range("A1:C5")) = "On" End Sub

我需要一个按钮,当按下该按钮时,它会在指定的A1:C5范围内的选定单元格或选定单元格中插入一个文本,比如说:“开”。

尝试:

Sub Button1_Click()

   Intersect(Selection, Range("A1:C5")) = "On"

End Sub