作者:革启兵 | 来源:互联网 | 2023-07-03 00:33
Couldanyonegivemeatiponthisproblem?谁能给我一个关于这个问题的小费?IhaveaddedthesetwoRoundedRectan
Could anyone give me a tip on this problem?
谁能给我一个关于这个问题的小费?
I have added these two "Rounded Rectangle" (B1 and B2) in my worksheet.
我在工作表中添加了这两个“圆角矩形”(B1和B2)。
I also have written the macro (mainMacro) below:
我也写了下面的宏(mainMacro):
Sub mainMacro()
if "B1 was selected" then
'do something
elseif "B2 was selected" then
'do other thing.
end If
End Sub
My question is: Is there any way to write a VBA code who will do something based on what retangle a user has clicked (as I wrote in the 'If' statement of the mainMacro)?
我的问题是:有没有办法编写VBA代码,根据用户点击的内容进行修改(正如我在mainMacro的'If'语句中所写的那样)?
Obs:I have noted that VBA identifies these rectangles as :Array("Rounded Rectangle x")
Obs:我注意到VBA将这些矩形标识为:Array(“Rounded Rectangle x”)
1 个解决方案