Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 699
Default Store input from userform in a password protected sheet

Hi All, I have designed a userform which accepts inputs and the inputs are
stored on Sheet2 of the same work book. Is there any way I can password
protect Sheet2 and still receive userinputs from userform in Sheet2?

Thanks in Advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default Store input from userform in a password protected sheet

With Worksheets("Sheet2")

.Unprotect Password:=MyPassword

' do your stuff

.Protect Password:=MyPassword

End With
--
jb


"sam" wrote:

Hi All, I have designed a userform which accepts inputs and the inputs are
stored on Sheet2 of the same work book. Is there any way I can password
protect Sheet2 and still receive userinputs from userform in Sheet2?

Thanks in Advance

  #3   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 699
Default Store input from userform in a password protected sheet

Thanks for the help, It does work now. But, I didnt kow we can still delete a
sheet even if it is protected. Is there a way where users cannot delete a
sheet?

Thanks in Advance

"john" wrote:

With Worksheets("Sheet2")

.Unprotect Password:=MyPassword

' do your stuff

.Protect Password:=MyPassword

End With
--
jb


"sam" wrote:

Hi All, I have designed a userform which accepts inputs and the inputs are
stored on Sheet2 of the same work book. Is there any way I can password
protect Sheet2 and still receive userinputs from userform in Sheet2?

Thanks in Advance

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default Store input from userform in a password protected sheet

Sam,
try this

Dim Mypassword As String

Mypassword = "ABCD1234"

With ThisWorkbook

.Unprotect Password:=Mypassword

With Worksheets("Sheet2")

.Unprotect Password:=Mypassword

' do your stuff

.Protect Password:=Mypassword

End With

.Protect Password:=Mypassword

End With

--
jb


"sam" wrote:

Thanks for the help, It does work now. But, I didnt kow we can still delete a
sheet even if it is protected. Is there a way where users cannot delete a
sheet?

Thanks in Advance

"john" wrote:

With Worksheets("Sheet2")

.Unprotect Password:=MyPassword

' do your stuff

.Protect Password:=MyPassword

End With
--
jb


"sam" wrote:

Hi All, I have designed a userform which accepts inputs and the inputs are
stored on Sheet2 of the same work book. Is there any way I can password
protect Sheet2 and still receive userinputs from userform in Sheet2?

Thanks in Advance

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
Password protected userform AOU Excel Discussion (Misc queries) 4 September 15th 07 04:48 PM
no password for protected sheet TJaques Excel Worksheet Functions 3 July 27th 06 05:51 PM
Remove password protected sheet Anna Excel Discussion (Misc queries) 3 October 18th 05 12:40 AM
password protected Sheet thrava Excel Discussion (Misc queries) 4 December 29th 04 07:54 PM
VBa, Password protected sheet fails to get unprotected with the same password Hans Rattink Excel Programming 3 July 28th 03 02:30 PM


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