LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default NEED HELP - How to disable a cell to restrict data entry

Dear Tom,

I want to know how to send the current working excel file using Microsoft
Outlook or some other means as an attachment to my email id automatically
whenever the file is being Closed.

Kindly let me know how to achieve this using excel macros.

Thanks and Regards,
Sriram Subramaniyan

----

"Tom Ogilvy" wrote:

Sounds like you are already familiar with the Change Event.

(right click on the sheet tab and select view code, then place this in the
resulting module if you don't have one or add similar code to your existing
change event.)

Private Sub Worksheet_Change(ByVal Target As Range)
If target.count 1 then exit sub
if target.column = 3 then
if trim(lcase(target.value)) = "completed" then
me.unprotect password:="ABC"
target.locked = True
me.Protect password:="ABC"
end if
End if
End Sub

Since your sheet will be protected, make sure that any cells that you want
to allow entries in are formatted as Unlocked. Change Column = 3 to
reflect the column number of the column where you want this behavior.

--
Regards,
Tom Ogilvy


 
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
Restrict data entry in a cell Ephraim Excel Worksheet Functions 3 March 18th 10 10:05 PM
lock cell conditional format but not restrict data entry GAM Excel Worksheet Functions 1 August 18th 07 06:53 AM
How can I restrict a cell(s) to alpha-only data entry? Robert T Excel Discussion (Misc queries) 2 January 10th 07 10:55 PM
Restrict Data Entry to only 4 possible entries ph8[_46_] Excel Programming 1 March 21st 06 03:19 PM
can i restrict data entry from certain columns surgeandoj Excel Discussion (Misc queries) 1 July 8th 05 05:28 PM


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