在Excel中运行 老是提示缺少函数或变量.求解决办法.Sub SelectRange ()2:ThisWo r k b o o k .Wo r k s h e e t s ( " S h e e t 1 " ) .R a n g e ( " A 1 " ) .A c t i v a t e3:ActiveCell.CurrentRegion.Select4:MsgBox"The address of the sel
来源:学生作业帮助网 编辑:作业帮 时间:2024/06/29 22:54:04
![在Excel中运行 老是提示缺少函数或变量.求解决办法.Sub SelectRange ()2:ThisWo r k b o o k .Wo r k s h e e t s (](/uploads/image/z/14064728-32-8.jpg?t=%E5%9C%A8Excel%E4%B8%AD%E8%BF%90%E8%A1%8C+%E8%80%81%E6%98%AF%E6%8F%90%E7%A4%BA%E7%BC%BA%E5%B0%91%E5%87%BD%E6%95%B0%E6%88%96%E5%8F%98%E9%87%8F.%E6%B1%82%E8%A7%A3%E5%86%B3%E5%8A%9E%E6%B3%95.Sub+SelectRange+%28%292%3AThisWo+r+k+b+o+o+k+.Wo+r+k+s+h+e+e+t+s+%28+%22+S+h+e+e+t+1+%22+%29+.R+a+n+g+e+%28+%22+A+1+%22+%29+.A+c+t+i+v+a+t+e3%3AActiveCell.CurrentRegion.Select4%3AMsgBox%22The+address+of+the+sel)
在Excel中运行 老是提示缺少函数或变量.求解决办法.Sub SelectRange ()2:ThisWo r k b o o k .Wo r k s h e e t s ( " S h e e t 1 " ) .R a n g e ( " A 1 " ) .A c t i v a t e3:ActiveCell.CurrentRegion.Select4:MsgBox"The address of the sel
在Excel中运行 老是提示缺少函数或变量.求解决办法.
Sub SelectRange ()
2:ThisWo r k b o o k .Wo r k s h e e t s ( " S h e e t 1 " ) .R a n g e ( " A 1 " ) .A c t i v a t e
3:ActiveCell.CurrentRegion.Select
4:MsgBox"The address of the selected range "& Selection.Address
5:End Sub
在Excel中运行 老是提示缺少函数或变量.求解决办法.Sub SelectRange ()2:ThisWo r k b o o k .Wo r k s h e e t s ( " S h e e t 1 " ) .R a n g e ( " A 1 " ) .A c t i v a t e3:ActiveCell.CurrentRegion.Select4:MsgBox"The address of the sel
这样修改即可:
Sub SelectRange()
Worksheets(1).Activate
Range("A1").Select
ActiveCell.CurrentRegion.Select
MsgBox "The address of the selected range " & Selection.Address
End Sub