UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

> how can I use user Form on a protected sheet.    
 
   
aali_dad
post Dec 30 2006, 11:25 AM
Post #1

UtterAccess Guru
Posts: 722
From: Asia



Hello Dear All

I have got a user form in Excel, but i am not sure whether i can use it in a protected sheet or not because once i have tried but it give me debug error. So may be something i should add in my code.

I have attached the screenshot of that code.

Thanx in advance.
Ali
Attached File(s)
Attached File  userformscreenshot.JPG ( 42.14K ) Number of downloads: 5
 
Go to the top of the page
 
+
 
Start new topic
Replies (1 - 3)
strive4peace
post Dec 30 2006, 06:28 PM
Post #2

UtterAccess VIP
Posts: 20,187
From: Colorado



Hi Ali,

It appears that your routine is:

1. looping through column A until it comes to an empty cell (presumably also an empty row)
2. then you are writing a value to column A, B, C, and D --> if the worksheet is protected, this will not be allowed unless the cells are unlocked or you unprotect the sheet first in your code

Also, there are better ways to find the first empty cell in column A... try this:

CODE
sub FindNextEmptyRow()
   Dim mRow As Long
   mRow = Range("A2").End(xlDown).Row + 1
   MsgBox mRow
End Sub
Go to the top of the page
 
+
aali_dad
post Dec 31 2006, 09:19 AM
Post #3

UtterAccess Guru
Posts: 722
From: Asia



Hi
Thanx for the small quicky code.
Well I tried to find the way to solve my problem.

I just insereted another worksheet. And I added a button as same as in my "check" worksheet and i called all the cells from my "Check" Worksheet.
Then i protected that because i don't want any one to Edit my values, that's why i did it.

And finally I hide my original Check worksheet.

Now when i click on my Button so it appears the form and when i enter the value it goes to "check" Worksheet and i can see the values in another sheet which is protected.

Thanx for a help
I tried to share how i solved my problem.

Thanx
Ali
Go to the top of the page
 
+
strive4peace
post Dec 31 2006, 03:56 PM
Post #4

UtterAccess VIP
Posts: 20,187
From: Colorado



you're welcome, Ali (IMG:http://www.utteraccess.com/forum/style_emoticons/default/wink.gif) happy to help
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 20th May 2013 - 08:38 AM