![]() |
Controlsource Puzzlement
Procedures I am required to follow in my job are often
presented on Excel Worksheets. To make it easier to follow from a distance of a few feet, I wish to display the tasks one-by-one on a UserForm in XL2000. I had previously succeeded in Access, but it became too tedious massaging and importing the source data, which could be superceded unpredictably, so it seemed easier for the future to operate on the primary data source. My code and UserForm is in a separate Workbook, which I intend to convert to an Add-In to share with my colleagues. I have set the Controlsource of a number of TextBoxes on the UserForm to cells on a worksheet in my own Workbook, and on pressing a "Prev" or "Next" CommandButton, I read the next/previous row in the source WorkBook, then copy these values to the Controlsource cells in my own Workbook. I have verified this happens as designed. The problem is that the UserForm's controls do not update with the changed values in their Controlsources. The Repaint action has no effect, apart from a blinking effect. Am I missing something obvious, or misunderstood the intended behaviour of contrls linked to Controlsources? The most common application for UserForms does seem to be data input, but the Help topics seem to suggest the Controlsource link operates in both directions. Cheers, Francis K. -- [Remove Trailing'Z' from mail address to reply.] |
Controlsource Puzzlement
control source should work in both directions. I tested it in xl2000 and it
worked great for me. I tried both modal and non modal mode and with screenupdating set to both false and true. The userform textboxes updated without fault. Are you sure the control source is set to the right cells. Did you use a sheet name such as ControlSource: Sheet1!A1 -- Regards, Tom Ogilvy "Francis Knight" wrote in message .ukZ... Procedures I am required to follow in my job are often presented on Excel Worksheets. To make it easier to follow from a distance of a few feet, I wish to display the tasks one-by-one on a UserForm in XL2000. I had previously succeeded in Access, but it became too tedious massaging and importing the source data, which could be superceded unpredictably, so it seemed easier for the future to operate on the primary data source. My code and UserForm is in a separate Workbook, which I intend to convert to an Add-In to share with my colleagues. I have set the Controlsource of a number of TextBoxes on the UserForm to cells on a worksheet in my own Workbook, and on pressing a "Prev" or "Next" CommandButton, I read the next/previous row in the source WorkBook, then copy these values to the Controlsource cells in my own Workbook. I have verified this happens as designed. The problem is that the UserForm's controls do not update with the changed values in their Controlsources. The Repaint action has no effect, apart from a blinking effect. Am I missing something obvious, or misunderstood the intended behaviour of contrls linked to Controlsources? The most common application for UserForms does seem to be data input, but the Help topics seem to suggest the Controlsource link operates in both directions. Cheers, Francis K. -- [Remove Trailing'Z' from mail address to reply.] |
Controlsource Puzzlement
Tom Ogilvy wrote:
control source should work in both directions. I tested it in xl2000 and it worked great for me. I tried both modal and non modal mode and with screenupdating set to both false and true. The userform textboxes updated without fault. Are you sure the control source is set to the right cells. Did you use a sheet name such as ControlSource: Sheet1!A1 -- Regards, Tom Ogilvy "Francis Knight" wrote in message .ukZ... [...] The problem is that the UserForm's controls do not update with the changed values in their Controlsources. The Repaint action has no effect, apart from a blinking effect. Am I missing something obvious, or misunderstood the intended behaviour of contrls linked to Controlsources? The most common application for UserForms does seem to be data input, but the Help topics seem to suggest the Controlsource link operates in both directions. Thanks for chipping in so quickly. Yes, I used the sheet qualifier in the ControlSource property, as displayed in the Properties pane with the UserForm selected in the VBA editor. The controls actually show the current source values when I do this, which gave me confidence that I had them pointed to the intended cells. At runtime, after the source cells are changed, and the UserForm hasn't, if I go back and open it for editing, then the controls update. It's almost as though the values seen at design time get embedded in the UserForm. Cheers, Francis K. -- [Remove Trailing'Z' from mail address to reply.] |
Controlsource Puzzlement
Here is a possibility. Do you have calculation set to manual under
tools=Options=Calculation tab. When I tested this it did cause the userform not to be updated. -- Regards, Tom Ogilvy "Francis Knight" wrote in message .ukZ... Tom Ogilvy wrote: control source should work in both directions. I tested it in xl2000 and it worked great for me. I tried both modal and non modal mode and with screenupdating set to both false and true. The userform textboxes updated without fault. Are you sure the control source is set to the right cells. Did you use a sheet name such as ControlSource: Sheet1!A1 -- Regards, Tom Ogilvy "Francis Knight" wrote in message .ukZ... [...] The problem is that the UserForm's controls do not update with the changed values in their Controlsources. The Repaint action has no effect, apart from a blinking effect. Am I missing something obvious, or misunderstood the intended behaviour of contrls linked to Controlsources? The most common application for UserForms does seem to be data input, but the Help topics seem to suggest the Controlsource link operates in both directions. Thanks for chipping in so quickly. Yes, I used the sheet qualifier in the ControlSource property, as displayed in the Properties pane with the UserForm selected in the VBA editor. The controls actually show the current source values when I do this, which gave me confidence that I had them pointed to the intended cells. At runtime, after the source cells are changed, and the UserForm hasn't, if I go back and open it for editing, then the controls update. It's almost as though the values seen at design time get embedded in the UserForm. Cheers, Francis K. -- [Remove Trailing'Z' from mail address to reply.] |
All times are GMT +1. The time now is 12:18 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com