Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Restrict data entry in a cell | Excel Worksheet Functions | |||
lock cell conditional format but not restrict data entry | Excel Worksheet Functions | |||
How can I restrict a cell(s) to alpha-only data entry? | Excel Discussion (Misc queries) | |||
Restrict Data Entry to only 4 possible entries | Excel Programming | |||
can i restrict data entry from certain columns | Excel Discussion (Misc queries) |