Magic_Doctor
Board Regular
- Joined
- Mar 182009
- Messages
- 56
Hello,
By means of an iconto which a macro is assignedI open the Windows calculator when I click on this icon:
It works very well.
The problem is that if I clickfor example10 times on the icon10 calculators will be opened. We can thus end up with a lot of open calculators… What I would like is that once the calculator is openwe can no longer open others. Is there a way to know if the calculator is open? Suppose this is possiblethen it would suffice to assign the result to a boolean variable (CalcOpen) and write this in the macro so that there can only be one open calculator:
Thank you in advance for all responses.
By means of an iconto which a macro is assignedI open the Windows calculator when I click on this icon:
VBA Code:
Sub Calculatrice()
‘Excel 2007
Shell "c:\windows\system32\calc.exe"
End Sub
The problem is that if I clickfor example10 times on the icon10 calculators will be opened. We can thus end up with a lot of open calculators… What I would like is that once the calculator is openwe can no longer open others. Is there a way to know if the calculator is open? Suppose this is possiblethen it would suffice to assign the result to a boolean variable (CalcOpen) and write this in the macro so that there can only be one open calculator:
VBA Code:
Sub Calculatrice()
If CalcOpen Then Exit Sub
Shell "c:\windows\system32\calc.exe"
End Sub