在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/12/19 09:55:06
在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