Flux rss
Search : in
By : Relevance Date Username
Statut : Solved

Excel Macro; Adding Password

zeromaim, on Tuesday 29 July 2008 à 15:51:57
Hello,

Hope you anyone can help me with this...

I need to create a macro that unlocks a password-protected sheet with password "password", do some instruction, then locks it again with same password.

Thanks in advance for any assistance.

zero
Configuration: Windows XP
Internet Explorer 7.0
Reply to zeromaim  Report this message to moderators Go to last message

1


  • 1
    This message seems useful, vote!
  • Ce message ne vous semble pas utile, votez !
  • Report this message to moderators
Ivan-hoe, on Tuesday 5 August 2008 à 17:45:49
Hello zero,
the syntax is quite simple
ActiveSheet.Unprotect ("MyPassWord")
'instructions
ActiveSheet.Protect ("MyPassWord")

for more details, I suggest you type "worksheet.protect" and "worksheet.unprotect" in the help file of visual basic editor.
Ivan
Reply to Ivan-hoe

2


  • 1
    This message seems useful, vote!
  • Ce message ne vous semble pas utile, votez !
  • Report this message to moderators
zeromaim, on Wednesday 6 August 2008 à 12:22:47
Hi Ivan,

Thanks for this, and other one as well.
I'm not actually a programer. I self-studied excel and i'm good at using formulas.
I just recently learn about macro and I used to just for recording to eliminate the circular ref error with formulas.
I was glad to have found this site and have read one of your response.

Thanks,

Anton
Reply to zeromaim

5


  • This message seems useful, vote!
  • Report this message to moderators
DaveyBoy, on Tuesday 7 October 2008 à 17:29:39
The ActiveSheet.Protect ("MyPassWord") works, but what if you want the set certain "abilities" to True when assigning the password as in the following code.

ActiveSheet.Protect ("MyPassWord") DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowSorting:=True, AllowFiltering:=True, AllowUsingPivotTables:=True

This errors out when the Macro is ran. Is there a different Syntax for a case like this?
Reply to DaveyBoy

6


  • 1
    This message seems useful, vote!
  • Ce message ne vous semble pas utile, votez !
  • Report this message to moderators
 Ivan-hoe, on Wednesday 8 October 2008 à 11:46:29
Hello,
try this syntax :
ActiveSheet.Protect PassWord:="MyPassWord", DrawingObjects:=True,  _ 
Contents:=True,  Scenarios:=True, AllowSorting:=True, AllowFiltering:=True,  _ 
AllowUsingPivotTables:=True 

Ivan
Reply to Ivan-hoe

3


  • 1
    This message seems useful, vote!
  • Ce message ne vous semble pas utile, votez !
  • Report this message to moderators
zeromaim, on Friday 8 August 2008 à 12:30:41
Thanks Ivan.

How do I change the status of this topic to "resolved"?

Anton
Reply to zeromaim

4


  • This message seems useful, vote!
  • Report this message to moderators
aquarelle, on Friday 8 August 2008 à 20:30:12
Hi,
Go to the top of your thread (to the right part), and check the case "solved" after click on "OK"
Best regards "Pour trouver une solution � ses probl�mes, il faut s'en donner la peine."
Reply to aquarelle

Résultats pour Excel Macro; Adding Password

Excel Macro Help Please (Solved) Hello Everyone, I am sking for some help with an Excel macro please. I have a 1,900 hundred static HTML pages that I have converted to text for the purpose of importing to a DB via an Excel CSV file. I have everything sitting in an excel file now with... en.kioskea.net/forum/affich-11146-excel-macro-help-please
Excel Macro for deleting rows IF cells not... Hello, I need help to create a Excel macro. Basicly what I have is a sheet full with information about different departments and what I want to do is delete every row EXCEPT the rows that contain some specified values (wich i would like to enter on... en.kioskea.net/forum/affich-12620-excel-macro-for-deleting-rows-if-cells-not
Excel Macro Help please I need help with an excel macro that will take a username (string) in the first column and look at everytime that they either have an P (present), T (tardy), E (Excused), or A (absent) in a second column. They will be given 400 points if they were... en.kioskea.net/forum/affich-33502-excel-macro-help-please

Résultats pour Excel Macro; Adding Password

How to Password Protect your Files and FoldersHow to Password Protect your Files and Folders How to password protect a Word document Password protection on Windows 3.x, Windows 95 and Windows 98 Password protection on Windows XP Password protection on Windows XP Home Edition Password... en.kioskea.net/faq/sujet-270-how-to-password-protect-your-files-and-folders

Résultats pour Excel Macro; Adding Password

Excel Macro Help neededI need help with an excel macro that will take a username (string) in the first column and look at everytime that they either have an P (present), T (tardy), E (Excused), or A (absent) in a second column. They will be given 400 points if they were... en.kioskea.net/forum/affich-33099-excel-macro-help-needed
Excel MacroI need help with an excel macro that will take a username (string) in the first column and look at everytime that they either have an P (present), T (tardy), E (Excused), or A (absent) in a second column. They will be given 400 points if they were... en.kioskea.net/forum/affich-33540-excel-macro
Checkbox problemHello, I have a problem with Excel macro. I created a small table describing a product and in this table I use about 16 checkboxes (added through Check Box icon situated on Forms Toolbar). I made 15 copies of this table so there are 16 on Sheet1. How... en.kioskea.net/forum/affich-28949-checkbox-problem

Résultats pour Excel Macro; Adding Password

Download Password CrackerEach time you must create a count on Websites, he asks you for an identifying or "Login" and for a password. Then when you have a good time giving different names and different passwords for every count, it is rather easy to forget it. Password... en.kioskea.net/telecharger/telecharger-567-password-cracker

Résultats pour Excel Macro; Adding Password

Spreadsheets - The Excel Interface Microsoft Excel is the spreadsheet in the Microsoft Office office suite. To start it, simply click on the appropriate icon in the Start menu (in Windows) or click on an Excel file (that has an .xls file extension). A Excel document is called a file... en.kioskea.net/tableur/tabinterface.php3
HTML - Hyperlinks Hypertext links or hyperlinks (anchors) are HTML elements that, when clicked on, enable readers to visit a new address. Hyperlinked text is underlined by default. Hyperlinks are what connect web pages to one another. They are used to travel: to... en.kioskea.net/html/htmlhypertxt.php3