ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Trust Access to Visual Basic Project (https://www.excelbanter.com/excel-programming/344912-trust-access-visual-basic-project.html)

Farah[_7_]

Trust Access to Visual Basic Project
 

Hello,

Is it possible to do something like this through a code:


Code
-------------------
Sub Farah()
If 'Trust to Visual Basic Project' is Already Checked Then
' Do certain action (i will mention my code here)

Otherwise if it is not checked, Then
' do the following

Application.SendKeys "%T"
Application.SendKeys "M"
Application.SendKeys "S", True
Application.SendKeys "^{PGDN}"
Application.SendKeys "{TAB}"
Application.SendKeys "{TAB}"
Application.SendKeys "{TAB}"
Application.SendKeys "{TAB}"
Application.SendKeys "{TAB}"
Application.SendKeys " ", True
Application.SendKeys "~", True

End Sub
-------------------


Thank you
Farah

--
Fara
-----------------------------------------------------------------------
Farah's Profile: http://www.excelforum.com/member.php...fo&userid=2777
View this thread: http://www.excelforum.com/showthread.php?threadid=48278



All times are GMT +1. The time now is 05:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com