Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Soe Soe is offline
external usenet poster
 
Posts: 5
Default make sure macro be loaded without user intervention

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?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default make sure macro be loaded without user intervention

Soe,

Why not try defaulting the columns to protected and having
the macro UNprotect the columns. That way, if the user
disables the macro, he cannot disable the protection.

Regards,
Ryan

-----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?


.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default make sure macro be loaded without user intervention

Maybe you can make the file read-only with a note that
macros must be enabled to write to the sheet. When the
macro is initiated, it can disable read only then protect
the columns.

Another way is to have the file on your computer so other
users have to network the file for access.

Or if there is only one computer, use Administration
rights to adjust the settings in the toolbars. Remove the
enable/disable macro toolbar setting altogether so it is
not present. This way there is no option.



There is a way to do what you want but it is a secret and
I don't know what it is.

-----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?


.

  #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?


.

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


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 08:14 AM.

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

About Us

"It's about Microsoft Excel"