VBA - Excel issues
I have a list of questions that i need clarification on. If anyone has
answers to any of these, a reply would be of great help. All the question are related to VBA. 1. How do i access previous values of a cell when detecting a change? 2. How can i access applications undo history? 3. In Worksheet_change how can i get the list of cells that have changed due to calculations? 4. In a worksheet, how can i come to know what is the location of the cell that defines the size of the data matrix? 5. How can i get the user action of insert/detele of rows/columns? Regards, |
VBA - Excel issues
1. either store the value before it is changed, or you can record the new
value and immediately issue Application.Undo. This would be done in the Change event 2. Most macro actions clear the undo history, so except for the above usage, undo is not very workable in macros. 3. Change is fired by a manual or programmatic change to the cell(s) in a worksheet. Changes caused by calculation are not stored or available unless you made a copy of all cell values prior to the calculation and compared it to the current state. 4. Possible msgbox Activecell.currentRegion.Address 5. In xl2000 and earlier, there is no event which fires specifically when a row or column is inserted or deleted. -- Regards, Tom Ogilvy Von Shean wrote in message ... I have a list of questions that i need clarification on. If anyone has answers to any of these, a reply would be of great help. All the question are related to VBA. 1. How do i access previous values of a cell when detecting a change? 2. How can i access applications undo history? 3. In Worksheet_change how can i get the list of cells that have changed due to calculations? 4. In a worksheet, how can i come to know what is the location of the cell that defines the size of the data matrix? 5. How can i get the user action of insert/detele of rows/columns? Regards, |
VBA - Excel issues
This is what I was working on in another group you posted to
and Tom has better answers for you, so where there is conflicting answers Tom's are better. 1. not available unless you want to do something yourself with an Event macro. 2. Nope, you can't undo after running a macro. 3. Every thing can change due to calculations i.e. =NOW() 4. Ctrl+A (selects all cells), Ctrl+G (Edit, GoTo), [Special], Formulas note the indicators below formulas are also used for constants had you chosen Constants. You might also take a look at my page Show FORMULA of another cell in Excel http://www.mvps.org/dmcritchie/excel/formula.htm 5. Ctrl+End you might also look at a list of shortcuts as found in HELP but placed together on one page. http://www.mvps.org/dmcritchie/excel/shortx2k.htm 6. Don't know what you mean but again I think you are trying to record keystrokes. What do you want an image of your workbook several times a minute. The closest thing you get in Excel is "Highlight Changes" which might be used for brief periods to record what got changed and who changed it after some breakpoint. It is a pain to work with but your are welcome to read about what I tried at Highlight, Change Highlighting http://www.mvps.org/dmcritchie/excel/highlite.htm I almost lost everything with that, so you might get better answers from someone who actually needs it. I think all I would have had to of done might have been to turn off sharing. If you want to do some of these things for just yourself, you can get a fairly decent picture of what you entered by recording a macro. Your questions are similar to someone who wanted to record every keystroke that everyone was doing a mainframe, if it were possible which it wasn't it would mean a few hundred bytes of overhead for such things as timestamp, machine id, application, accounting information, userid etc. for each keystroke. --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "Tom Ogilvy" wrote ... 1. either store the value before it is changed, or you can record the new value and immediately issue Application.Undo. This would be done in the Change event 2. Most macro actions clear the undo history, so except for the above usage, undo is not very workable in macros. 3. Change is fired by a manual or programmatic change to the cell(s) in a worksheet. Changes caused by calculation are not stored or available unless you made a copy of all cell values prior to the calculation and compared it to the current state. 4. Possible msgbox Activecell.currentRegion.Address 5. In xl2000 and earlier, there is no event which fires specifically when a row or column is inserted or deleted. Von Shean wrote ... I have a list of questions that i need clarification on. If anyone has answers to any of these, a reply would be of great help. All the question are related to VBA. 1. How do i access previous values of a cell when detecting a change? 2. How can i access applications undo history? 3. In Worksheet_change how can i get the list of cells that have changed due to calculations? 4. In a worksheet, how can i come to know what is the location of the cell that defines the size of the data matrix? 5. How can i get the user action of insert/detele of rows/columns? |
All times are GMT +1. The time now is 03:31 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com