Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default startign with VBA

i want to ask if have an exceh sheet and it contains some codes
but if this file is opened in excel that have the security high it does not
work so i want a sloution that if i have i file has some codes must run these
codes on any MS OFFICE even if the security was high i want to run the codes
automatically without the user changes the security

at the end so i want to run some codes even if the security is higth or some
code that changes the excel securtiy to low or something like that

and thank you so much for your cooperation

Walid M. Bahgat
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default startign with VBA

You can't. That would defeat the purpose of the security setting. If you
could do it then any malicious code writer could do it. The user must allow
macros to run.
What I have done is to create a Warning Sheet that says something like "You
must allow macros to run to use this Workbook. Close this Workbook, change
your security to Medium (Tools/Macro/Security), and re-open Workbook. Select
the 'Enable Macros' button on the Pop-Up Box."
In the Workbook_Open event I would Hide this Warning sheet and Unhide all
the other necessary workbook sheets.
In the Workbook_Close event I would Unhide the Warning sheet and Hide all
other sheets.
Now when they open the workbook on High Security, the only sheet visible is
the Warning.
If they open it with Low or Medium w/Macros Enabled, then the Workbook_Open
event will run, giving them access to the Workbook.

Hope this will help.
Mike F
"Walid M. Bahgat" wrote in message
...
i want to ask if have an exceh sheet and it contains some codes
but if this file is opened in excel that have the security high it does
not
work so i want a sloution that if i have i file has some codes must run
these
codes on any MS OFFICE even if the security was high i want to run the
codes
automatically without the user changes the security

at the end so i want to run some codes even if the security is higth or
some
code that changes the excel securtiy to low or something like that

and thank you so much for your cooperation

Walid M. Bahgat



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default startign with VBA


Good afternoon Walid M. Bahgat

I believe it is possible - though I haven't actually done it personall
- by editing the registry settings through VBA, the home of the securit
setting being :

HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\E xcel\Security

Alternatively, set yourself up with a digital certificate or (i
possible) code your project as an add-in. Either of these two ways wil
prevent the macro warning message from appearing.

HTH

Dominic

--
dominic
-----------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...fo&userid=1893
View this thread: http://www.excelforum.com/showthread.php?threadid=46845

  #4   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default startign with VBA

Isn't that a Catch22? With security set to high, you won't be able to run
VBA code to edit the registry. At any rate, after editing the registry, you
still have to close and reopen Excel to make the security changes effective.

"dominicb" wrote:


Good afternoon Walid M. Bahgat

I believe it is possible - though I haven't actually done it personally
- by editing the registry settings through VBA, the home of the security
setting being :

HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\E xcel\Security

Alternatively, set yourself up with a digital certificate or (if
possible) code your project as an add-in. Either of these two ways will
prevent the macro warning message from appearing.

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=468457


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default startign with VBA

Hi Walid,

See :
http://tinyurl.com/798o6

---
Regards,
Norman



"Walid M. Bahgat" wrote in message
...
i want to ask if have an exceh sheet and it contains some codes
but if this file is opened in excel that have the security high it does
not
work so i want a sloution that if i have i file has some codes must run
these
codes on any MS OFFICE even if the security was high i want to run the
codes
automatically without the user changes the security

at the end so i want to run some codes even if the security is higth or
some
code that changes the excel securtiy to low or something like that

and thank you so much for your cooperation

Walid M. Bahgat





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"