Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Using macro to un/protect sheet
hi hi, thx agen for the previous helps =D
i searched this up to see if i could find nething b4 disturbing you nice ppl lol, but i still dont understand. i want to make a button, which will allow the user to View the books n not rewrite. And a button which allows the user to actually add/edit the data, however this user would need to enter a password. i want both buttons to open the same workbook, but each with a different authority. I dont know how to create like a message or box where the user has to enter a password to gain access in adding new data . i've been thinkin long and hard but dont know where to start, can anyone help me out? lol thanks in advance =) |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Using macro to un/protect sheet
Bonbon, how about something like this on the sheet so the user would have to
enter a password to edit Sub PassWord_To_Edit() 'must lock VBA project so you can't see the password in it Dim MyStr1 As String, MyStr2 As String With ActiveSheet MyStr2 = ("123") 'This is the password and it is CASE sensitive MyStr1 = InputBox("Password Is Required To Add/Edit Data") If MyStr1 = MyStr2 Then 'put your code here to add data Else MsgBox ("Access Denied") End If End With End Sub -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "Bonbon" wrote in message ... hi hi, thx agen for the previous helps =D i searched this up to see if i could find nething b4 disturbing you nice ppl lol, but i still dont understand. i want to make a button, which will allow the user to View the books n not rewrite. And a button which allows the user to actually add/edit the data, however this user would need to enter a password. i want both buttons to open the same workbook, but each with a different authority. I dont know how to create like a message or box where the user has to enter a password to gain access in adding new data . i've been thinkin long and hard but dont know where to start, can anyone help me out? lol thanks in advance =) |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Using macro to un/protect sheet
Thank you Paul B, that worked great! you said, lock VBA project, how? thanks again -- Bonbon ------------------------------------------------------------------------ Bonbon's Profile: http://www.excelforum.com/member.php...o&userid=31866 View this thread: http://www.excelforum.com/showthread...hreadid=513415 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro to find cell content in sheets and make sheet active | Excel Discussion (Misc queries) | |||
Macro to Go to Sheet | Excel Discussion (Misc queries) | |||
Macro that password protects a sheet | Excel Discussion (Misc queries) | |||
MACRO - copy rows based on value in column to another sheet | Excel Discussion (Misc queries) | |||
2 questions, copying data from sheet to sheet and assigning macro | Excel Worksheet Functions |