1、声明一个变量并且给它赋值。Declare a various and assign value by selectionchange event.Option ExplicitPublic myName As StringPrivate Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)myName = Target.AddressEnd Sub

3、我单击执行宏命令,通过按control +Q, 如图,提示框没有给我任何提示I execute the function by pressing Control+Q, we can see the snapshot that it doesn't show any to me

5、我们再按一下Control+Q会得到提示框,如图所示we press the control+Q again , we get the expected result as snapshot
