![]() |
How to tell if a range or cell is dirty
Is there any way to tell if any of the cells in a range have been changed? I
have a VBA routine that allows the user to "auto-fill" a range of cells with a certain value, but if any of the cells in the range have been modified but not saved, I want to inform the user and (maybe) save the changes first. I can't seem to find any property that indicates whether a range or a specific cell has changed or not. Is there such a property, or maybe a way to compare the current cell contents with the previous cell contents? Thanks for any information, Carl Rapson |
How to tell if a range or cell is dirty
Carl
?ThisWorkbook.Saved This will return True if it has not been changed and False if it has. Regards Trevor "Carl Rapson" wrote in message ... Is there any way to tell if any of the cells in a range have been changed? I have a VBA routine that allows the user to "auto-fill" a range of cells with a certain value, but if any of the cells in the range have been modified but not saved, I want to inform the user and (maybe) save the changes first. I can't seem to find any property that indicates whether a range or a specific cell has changed or not. Is there such a property, or maybe a way to compare the current cell contents with the previous cell contents? Thanks for any information, Carl Rapson |
How to tell if a range or cell is dirty
Thanks, I finally found that property, and it does help me somewhat.
However, that doesn't solve my main problem -- how can I tell if the cells contained within a range have been changed? That way, I don't have to save unless the cells I'm going to overwrite haven't been saved. Thanks again, Carl "Trevor Shuttleworth" wrote in message ... Carl ?ThisWorkbook.Saved This will return True if it has not been changed and False if it has. Regards Trevor "Carl Rapson" wrote in message ... Is there any way to tell if any of the cells in a range have been changed? I have a VBA routine that allows the user to "auto-fill" a range of cells with a certain value, but if any of the cells in the range have been modified but not saved, I want to inform the user and (maybe) save the changes first. I can't seem to find any property that indicates whether a range or a specific cell has changed or not. Is there such a property, or maybe a way to compare the current cell contents with the previous cell contents? Thanks for any information, Carl Rapson |
How to tell if a range or cell is dirty
Carl
you could use the Worksheet_Change event to set a flag if any of the cells you are interested in get changed. Regards Trevor "Carl Rapson" wrote in message ... Thanks, I finally found that property, and it does help me somewhat. However, that doesn't solve my main problem -- how can I tell if the cells contained within a range have been changed? That way, I don't have to save unless the cells I'm going to overwrite haven't been saved. Thanks again, Carl "Trevor Shuttleworth" wrote in message ... Carl ?ThisWorkbook.Saved This will return True if it has not been changed and False if it has. Regards Trevor "Carl Rapson" wrote in message ... Is there any way to tell if any of the cells in a range have been changed? I have a VBA routine that allows the user to "auto-fill" a range of cells with a certain value, but if any of the cells in the range have been modified but not saved, I want to inform the user and (maybe) save the changes first. I can't seem to find any property that indicates whether a range or a specific cell has changed or not. Is there such a property, or maybe a way to compare the current cell contents with the previous cell contents? Thanks for any information, Carl Rapson |
How to tell if a range or cell is dirty
Thanks, I guess that's what I'll have to do. I was just hoping there was a
built-in way of doing it. Carl "Trevor Shuttleworth" wrote in message ... Carl you could use the Worksheet_Change event to set a flag if any of the cells you are interested in get changed. Regards Trevor "Carl Rapson" wrote in message ... Thanks, I finally found that property, and it does help me somewhat. However, that doesn't solve my main problem -- how can I tell if the cells contained within a range have been changed? That way, I don't have to save unless the cells I'm going to overwrite haven't been saved. Thanks again, Carl "Trevor Shuttleworth" wrote in message ... Carl ?ThisWorkbook.Saved This will return True if it has not been changed and False if it has. Regards Trevor "Carl Rapson" wrote in message ... Is there any way to tell if any of the cells in a range have been changed? I have a VBA routine that allows the user to "auto-fill" a range of cells with a certain value, but if any of the cells in the range have been modified but not saved, I want to inform the user and (maybe) save the changes first. I can't seem to find any property that indicates whether a range or a specific cell has changed or not. Is there such a property, or maybe a way to compare the current cell contents with the previous cell contents? Thanks for any information, Carl Rapson |
All times are GMT +1. The time now is 03:58 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com