![]() |
How to find if something has been changed on a worksheet..
Hi,
I have a worksheet "UnprocessedPayments". It is populated with some unprocessed payment records as some fields (columns) are in error. In addition to the fields in error, the sheet also has suggested values to the fields in error. I have provided the user with two command buttons "UpdateSheet" and "ProceedTOUpload". The user can either agree with the suggested values or he can provide his own values in the suggested fields. When the "UpdateSheet" command button is pressed all the suggested/userchanged values will overwrite the fields in error. The the user sj=hould press the "ProceedTOUpload" command button to process the payments. The above works fine. What I want is that when the user presses the "ProceedTOUpload" button without pressing "UploadSheet" then the system should display an error message that the "UpdateSheet" needs to be pressed. Also one more question. If we have a command button in a user form and we click it then it directly goes to the code window into command_click event. But why does it not happen with a comman button on a sheet. Also the code page for the sheet has only General and Worksheet sections. Why doesn't it identify any controls on it. I had to assign a macro to these command button to work. |
How to find if something has been changed on a worksheet..
Prasad,
1. One way round this would be to have a value assigned to a cell (possibly on a hidden sheet) on completion of the first macro, which you could then check at the start of the second macro. 2. There are two different types of command buttons. You have obvioulsy used the one from the "Forms" toolbar which acts just as you describe, with a macro having to be assigned to it. If you use the control button from the "Controls Toolbox" toolbar instead, it will appear in the Worksheet module as an object with it's own programmable events, properties window and so forth. Cheers, Pete. -----Original Message----- Hi, I have a worksheet "UnprocessedPayments". It is populated with some unprocessed payment records as some fields (columns) are in error. In addition to the fields in error, the sheet also has suggested values to the fields in error. I have provided the user with two command buttons "UpdateSheet" and "ProceedTOUpload". The user can either agree with the suggested values or he can provide his own values in the suggested fields. When the "UpdateSheet" command button is pressed all the suggested/userchanged values will overwrite the fields in error. The the user sj=hould press the "ProceedTOUpload" command button to process the payments. The above works fine. What I want is that when the user presses the "ProceedTOUpload" button without pressing "UploadSheet" then the system should display an error message that the "UpdateSheet" needs to be pressed. Also one more question. If we have a command button in a user form and we click it then it directly goes to the code window into command_click event. But why does it not happen with a comman button on a sheet. Also the code page for the sheet has only General and Worksheet sections. Why doesn't it identify any controls on it. I had to assign a macro to these command button to work. . |
All times are GMT +1. The time now is 07:03 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com