LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default make sure macro be loaded without user intervention

You can do a couple of things:
1) set the Tools|Macro|Security... menu option in Excel
to Low (this will enable the running of macros ALL the
time - careful though, since this will run malicious
macros from nefarious sources as well). You could also
digitally sign your macro, which I believe will allow you
to change the security level to Medium.
2) In a VBA module, create a macro called "Sub
Auto_Open". Excel will automatically execute all code
within the Auto_open subroutine whenever the file is
opened. You can program within the Auto_open routine,
code that looks at the users login name by using
the "Application.UserName" function, which will give the
name of the current user. From there restrict who has
access to what. Also look up "UserAccessList" and
UserAccess Object" from within the Visual Basic Help
structure within Excel. To get to the VBA portion from
Excel, press the [Alt] + [F11] keys simultaneously.

Andrew Lenczycki
-----Original Message-----
i hv a code which protects selected columns according to

users' login name,
so that unautorized user can't edit on columns on which

he is not supposed
to.
there is a problem, user has to "enable" macro when he

opens the workbook.
If he disable the macro, then the whole protection dies

as there is no macro
to run to check login name and authorization.
anybody can advice?


.

 
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do i make office available to multiple user accounts alfa156s Setting up and Configuration of Excel 0 August 7th 08 09:10 PM
Using VBA to make a user input a note when making changes to a cel Adam Ronalds[_2_] Excel Worksheet Functions 3 June 24th 08 05:54 PM
Excel to Oracle without user intervention Illya Teideman Excel Discussion (Misc queries) 0 March 23rd 07 03:25 PM
How do I make my list name for drop down box conditional on user e duckexceluser Excel Discussion (Misc queries) 2 February 25th 07 05:44 PM
Forcing the user to make entries in a specified worksheet KG Excel Discussion (Misc queries) 2 June 11th 05 08:01 PM


All times are GMT +1. The time now is 06:56 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"