i have which is i fond in net
please let me know how can i modify this code
this undo code should work
After Running Other Macro Codes
Please Login or Register to view this content.
i have which is i fond in net
please let me know how can i modify this code
this undo code should work
After Running Other Macro Codes
Please Login or Register to view this content.
Hi baig123,
Unfortunately, what you want probably can not be done easily.
Take the following example Macro:
For example if you put 1,2,3,4 in 4 consecutive cells. Manually you can undo all 4 actions.Please Login or Register to view this content.
Put 1,2,3,4 in 4 consecutive cells again. Run Macro SimpleUndo() several times. All that happens is the 4 toggles between 4 and whatever was in the cell previously.
You can write a macro to log changes you make (i.e. saving the previous value). You can then write another macro to undo what was done by using the values of the changes (i.e. previous values) you saved. See the attached file that contains the following code:
Sheet1 module:
Ordinary Code module (e.g. Module ModUnDo):Please Login or Register to view this content.
Please Login or Register to view this content.
Lewis
Last edited by LJMetzger; 11-27-2014 at 02:12 PM. Reason: Corrected errors in MyCustomUndo() and replaced attached file.
thanks for an suggest
but i have more macro codes in the same excel which is to run i have attached to my sheet
i have access code which is used to access data from the database
what i was trying to do is after accessing data from the database
if any client try to edit first 6 columns it should undo immediatly
it should display an output that youcant change the row
this undo code should works after running accessing data from the database in a sheet
it is possibale to do it Please let me know
Please Login or Register to view this content.
I think you are trying to use the wrong tool to do what you want. I think you want to lock the cells, and protect the sheet.
To protect the sheet:
a. Select all the cells in the workbook > Format Cells > Protection > Uncheck Locked (i.e. allow access to all cells)
b. Select the first 6 columns > Format Cells > Protection > Check Locked (i.e. do not all allow access to columns 1-6)
c. Tools > Protection > Protect Sheet (to activate what you just selected).
When you need to unlock those cells when you are downloading data from your data base you could use something like:
Please Login or Register to view this content.
can i fixed a range columns to be protected in this code
Please Login or Register to view this content.
Yes,
Use the following instructions from my previous post.
The following tutorial may help you:To protect the sheet:
a. Select all the cells in the workbook > Format Cells > Protection > Uncheck Locked (i.e. allow access to all cells)
b. Select the first 6 columns > Format Cells > Protection > Check Locked (i.e. do not all allow access to columns 1-6)
c. Tools > Protection > Protect Sheet (to activate what you just selected).
http://www.functionx.com/excel/Lesson19.htm
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks