Home > Software engineering >  VBA end users delete row/column operation
VBA end users delete row/column operation

Time:12-22

Made a simple Excel file, there are some vba scripts, if the user to delete the whole row/column will go wrong, so, want to Worksheet_Change events when the user to delete the entire line or the whole column operation, play a yes/no box, if you select no, terminate the delete operation, thank you.

CodePudding user response:

Have a good solution? Up

CodePudding user response:

It doesn't matter now that allow yes, deleted, and without questions will affect the results will go wrong?
What a mess of logic!

CodePudding user response:

refer to the original poster ly20846102 response:
made a simple Excel file, there are some vba scripts, if the user to delete the whole row/column will go wrong, so, want to Worksheet_Change events when the user to delete the entire line or the whole column operation, play a yes/no box, if you select no, terminate the delete operation, thank you.

Set up to protect the worksheet, select yes, request for a password with respect to OK,

CodePudding user response:

Workbook events, may be able to realize some function,
 arr=array (" Cell ", "292", "Column", "294", "Row", "293", "XLM Cell", "292") 
With the application
For I=0 to 6 step 2
Commandbars (arr (I)). Controls (cint (arr (I + 1))). The enable=false
Next
End with
  •  Tags:  
  • VBA
  • Related