Hello Paul, Please find attached report and is it possible to disable Delete option for all possible ways on particular condition
Regards, Chandrashekar B On Tue, Jul 31, 2018 at 5:03 PM, Paul Schreiner <schreiner_p...@att.net> wrote: > I'm not sure how you implemented the code. > If it is installed properly, the user cannot SELECT the entire row to > delete! > > The code goes in the "Thisworkbook" module. > you can add the line: > > Debug.Assert False > > to have it pause to see if the macro is actually being called. > *Paul* > ----------------------------------------- > > > > > > > > *“Do all the good you can,By all the means you can,In all the ways you > can,In all the places you can,At all the times you can,To all the people > you can,As long as ever you can.” - John Wesley* > ----------------------------------------- > > > On Monday, July 30, 2018 11:59 PM, Chandra Shekar < > chandrashekarb....@gmail.com> wrote: > > > Hello Paul, > > Thanks for the reply. I tried this code but if user delete entire row it > does not work. > > My requirement is code should not allow to delete entire row but it should > allow to delete cells & it should allow to update cells/row. > > Regards, > > Chandru > > On Mon, Jul 30, 2018 at 6:20 PM, Paul Schreiner <schreiner_p...@att.net> > wrote: > > I've done something like this before using a couple of different methods. > > It's really going to depend on what you're trying to "block". > > For instance, if you want to keep someone from deleting any of the rows > 1-8, then > you can use a SelectionChange event to test for selected rows in the 1-8 > range and the number of columns selected as greater than, say, 100... > If the selection meets this criteria, simply change the selection and > cancel the sub > > Like: > > Private Sub Workbook_SheetSelectionChange( ByVal Sh As Object, ByVal > Target As Range) > > Dim Targ As Range > For Each Targ In Target.Rows > If ((Targ.Row >= 1) And (Targ.Row <= 8)) Then > If (Target.Columns.Count > 100) Then > Application.EnableEvents = False > Cells(Targ.Row, "A").Select > Application.EnableEvents = True > Exit Sub > End If > End If > Next Targ > End Sub > > *Paul* > ------------------------------ ----------- > > > > > > > > *“Do all the good you can,By all the means you can,In all the ways you > can,In all the places you can,At all the times you can,To all the people > you can,As long as ever you can.” - John Wesley*------------------------------ > ----------- > > > On Sunday, July 29, 2018 4:06 AM, Chandra Shekar < > chandrashekarb....@gmail.com> wrote: > > > Hello, > > Is there any way to prevent from deletion based on condition but without > using protecting sheet. > > For ex: Prevent user to delete row lesser than 8 but still he can able to > edit it. > > > > Regards, > > Chandru > -- > Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s > =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ > https://www.facebook.com/ > discussexcel <https://www.facebook.com/discussexcel> > > FORUM RULES > > 1) Use concise, accurate thread titles. Poor thread titles, like Please > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice > will not get quick attention or may not be answered. > 2) Don't post a question in the thread of another member. > 3) Don't post questions regarding breaking or bypassing any security > measure. > 4) Acknowledge the responses you receive, good or bad. > 5) Jobs posting is not allowed. > 6) Sharing copyrighted material and their links is not allowed. > > NOTE : Don't ever post confidential data in a workbook. Forum owners and > members are not responsible for any loss. > --- > You received this message because you are subscribed to the Google Groups > "MS EXCEL AND VBA MACROS" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to excel-macros+unsubscribe@ googlegroups.com > <excel-macros+unsubscr...@googlegroups.com>. > To post to this group, send email to excel-macros@googlegroups.com. > Visit this group at https://groups.google.com/ group/excel-macros > <https://groups.google.com/group/excel-macros>. > For more options, visit https://groups.google.com/d/ optout > <https://groups.google.com/d/optout>. > > > -- > Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s > =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ > https://www.facebook.com/ > discussexcel <https://www.facebook.com/discussexcel> > > FORUM RULES > > 1) Use concise, accurate thread titles. Poor thread titles, like Please > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice > will not get quick attention or may not be answered. > 2) Don't post a question in the thread of another member. > 3) Don't post questions regarding breaking or bypassing any security > measure. > 4) Acknowledge the responses you receive, good or bad. > 5) Jobs posting is not allowed. > 6) Sharing copyrighted material and their links is not allowed. > > NOTE : Don't ever post confidential data in a workbook. Forum owners and > members are not responsible for any loss. > --- > You received this message because you are subscribed to the Google Groups > "MS EXCEL AND VBA MACROS" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to excel-macros+unsubscribe@ googlegroups.com > <excel-macros+unsubscr...@googlegroups.com>. > To post to this group, send email to excel-macros@googlegroups.com. > Visit this group at https://groups.google.com/ group/excel-macros > <https://groups.google.com/group/excel-macros>. > For more options, visit https://groups.google.com/d/ optout > <https://groups.google.com/d/optout>. > > > -- > Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s > =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ > https://www.facebook.com/discussexcel > > FORUM RULES > > 1) Use concise, accurate thread titles. Poor thread titles, like Please > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice > will not get quick attention or may not be answered. > 2) Don't post a question in the thread of another member. > 3) Don't post questions regarding breaking or bypassing any security > measure. > 4) Acknowledge the responses you receive, good or bad. > 5) Jobs posting is not allowed. > 6) Sharing copyrighted material and their links is not allowed. > > NOTE : Don't ever post confidential data in a workbook. Forum owners and > members are not responsible for any loss. > --- > You received this message because you are subscribed to the Google Groups > "MS EXCEL AND VBA MACROS" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to excel-macros+unsubscr...@googlegroups.com. > To post to this group, send email to excel-macros@googlegroups.com. > Visit this group at https://groups.google.com/group/excel-macros. > For more options, visit https://groups.google.com/d/optout. > > > -- > Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s > =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ > https://www.facebook.com/discussexcel > > FORUM RULES > > 1) Use concise, accurate thread titles. Poor thread titles, like Please > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice > will not get quick attention or may not be answered. > 2) Don't post a question in the thread of another member. > 3) Don't post questions regarding breaking or bypassing any security > measure. > 4) Acknowledge the responses you receive, good or bad. > 5) Jobs posting is not allowed. > 6) Sharing copyrighted material and their links is not allowed. > > NOTE : Don't ever post confidential data in a workbook. Forum owners and > members are not responsible for any loss. > --- > You received this message because you are subscribed to the Google Groups > "MS EXCEL AND VBA MACROS" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to excel-macros+unsubscr...@googlegroups.com. > To post to this group, send email to excel-macros@googlegroups.com. > Visit this group at https://groups.google.com/group/excel-macros. > For more options, visit https://groups.google.com/d/optout. > -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at https://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout.
Dele_Rows.xlsm
Description: application/vnd.ms-excel.sheet.macroenabled.12