Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
RHmcse2003
 
Posts: n/a
Default How do I protect only formulas in Excel?

Hi, I am looking for a solution to be able to allow some cells that are
unlocked to have other users enter data into them, however I don't wan't
other users to be able to enter formulas without a password. I have heard of
this being done before but I didn't know if it was an option I've overlooked
or some kind of advanced VB code.

Any help is greatly appreciated,

RH
  #2   Report Post  
Peter Jausovec
 
Posts: n/a
Default

Hi,

Just an idea:
try catching OnChange event and check if = is entered and then popup a
password dialog

Hope this helps.

Peter
--
http://blog.jausovec.net


"RHmcse2003" je napisal:

Hi, I am looking for a solution to be able to allow some cells that are
unlocked to have other users enter data into them, however I don't wan't
other users to be able to enter formulas without a password. I have heard of
this being done before but I didn't know if it was an option I've overlooked
or some kind of advanced VB code.

Any help is greatly appreciated,

RH

  #3   Report Post  
RHmcse2003
 
Posts: n/a
Default

That sounds pretty logical Peter, any idea on the syntax for that?

Thanks for the replies!

"Peter Jausovec" wrote:

Hi,

Just an idea:
try catching OnChange event and check if = is entered and then popup a
password dialog

Hope this helps.

Peter
--
http://blog.jausovec.net


"RHmcse2003" je napisal:

Hi, I am looking for a solution to be able to allow some cells that are
unlocked to have other users enter data into them, however I don't wan't
other users to be able to enter formulas without a password. I have heard of
this being done before but I didn't know if it was an option I've overlooked
or some kind of advanced VB code.

Any help is greatly appreciated,

RH

  #4   Report Post  
Peter Jausovec
 
Posts: n/a
Default

Hi,

Use the SelectionChangeEvent:

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
If (Left(Target.Value,1) = "=") Then
' user is trying to enter a formula - do something
End If
End Sub
--
http://blog.jausovec.net


"RHmcse2003" je napisal:

That sounds pretty logical Peter, any idea on the syntax for that?

Thanks for the replies!

"Peter Jausovec" wrote:

Hi,

Just an idea:
try catching OnChange event and check if = is entered and then popup a
password dialog

Hope this helps.

Peter
--
http://blog.jausovec.net


"RHmcse2003" je napisal:

Hi, I am looking for a solution to be able to allow some cells that are
unlocked to have other users enter data into them, however I don't wan't
other users to be able to enter formulas without a password. I have heard of
this being done before but I didn't know if it was an option I've overlooked
or some kind of advanced VB code.

Any help is greatly appreciated,

RH

  #5   Report Post  
b&s
 
Posts: n/a
Default

.... Hi Peter, maybe this:

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
If Left(Target.Formula, 1) = "=" Then
' user is trying to enter a formula - do something"
End If
End Sub


--
pozdrav!
Berislav

Always nice to hear if a suggestion works or not.
************************************************** *********
ROT13 - email address



Peter Jausovec wrote:
Hi,

Use the SelectionChangeEvent:

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal
Target As Range)
If (Left(Target.Value,1) = "=") Then
' user is trying to enter a formula - do something
End If
End Sub

That sounds pretty logical Peter, any idea on the syntax for that?

Thanks for the replies!

"Peter Jausovec" wrote:

Hi,

Just an idea:
try catching OnChange event and check if = is entered and then
popup a password dialog

Hope this helps.

Peter
--
http://blog.jausovec.net


"RHmcse2003" je napisal:

Hi, I am looking for a solution to be able to allow some cells
that are unlocked to have other users enter data into them,
however I don't wan't other users to be able to enter formulas
without a password. I have heard of this being done before but I
didn't know if it was an option I've overlooked or some kind of
advanced VB code.

Any help is greatly appreciated,

RH






  #6   Report Post  
Peter Jausovec
 
Posts: n/a
Default

Hi Berislav,

Well, basically in this case it doesn't matter if you use .Value or .Formula

Range("A1").Value = "=A3+A4"
Range("A2").Formula = "=A3+A4"

Both of them have same result :)

Regards,
Peter
--
http://blog.jausovec.net


"b&s" je napisal:

.... Hi Peter, maybe this:

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
If Left(Target.Formula, 1) = "=" Then
' user is trying to enter a formula - do something"
End If
End Sub


--
pozdrav!
Berislav

Always nice to hear if a suggestion works or not.
************************************************** *********
ROT13 - email address



Peter Jausovec wrote:
Hi,

Use the SelectionChangeEvent:

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal
Target As Range)
If (Left(Target.Value,1) = "=") Then
' user is trying to enter a formula - do something
End If
End Sub

That sounds pretty logical Peter, any idea on the syntax for that?

Thanks for the replies!

"Peter Jausovec" wrote:

Hi,

Just an idea:
try catching OnChange event and check if = is entered and then
popup a password dialog

Hope this helps.

Peter
--
http://blog.jausovec.net


"RHmcse2003" je napisal:

Hi, I am looking for a solution to be able to allow some cells
that are unlocked to have other users enter data into them,
however I don't wan't other users to be able to enter formulas
without a password. I have heard of this being done before but I
didn't know if it was an option I've overlooked or some kind of
advanced VB code.

Any help is greatly appreciated,

RH





  #7   Report Post  
Kassie
 
Posts: n/a
Default

Hi

Unprotect the cells where you want to allow entries, then click on
Tools|Protection|Protect sheet. Type in a password and untick Select locked
cells.

Click on OK, and when asked, re-enter the password

"RHmcse2003" wrote:

Hi, I am looking for a solution to be able to allow some cells that are
unlocked to have other users enter data into them, however I don't wan't
other users to be able to enter formulas without a password. I have heard of
this being done before but I didn't know if it was an option I've overlooked
or some kind of advanced VB code.

Any help is greatly appreciated,

RH

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
Excel formulas to create large blocks of text Greg Boettcher Excel Discussion (Misc queries) 5 June 12th 05 06:41 PM
How can I protect an excel worksheet containing filters? JMcG Excel Discussion (Misc queries) 4 April 13th 05 03:13 PM
How Excel & ACCPAC 6.1 calculate formulas???? Bass Mama1 Excel Worksheet Functions 1 February 9th 05 03:25 PM
Excel Formulas albebach Excel Discussion (Misc queries) 1 February 2nd 05 09:52 PM
Problems with Excel formulas when 2002 upgraded to XP Kathi McGraw Excel Worksheet Functions 0 November 16th 04 05:27 PM


All times are GMT +1. The time now is 05:41 AM.

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

About Us

"It's about Microsoft Excel"