![]() |
Form will not refresh without an unneeded msgbox
I am closing a form and transferring the info to a spreadsheet to allow users to work with it. I then give the option of reopening the form and at that time reload the info from the spreadsheet into the form.
Problem is the information is not displayed correctly (caluclations are not run) on the form unless I run a msgbox. I expected that a Userform.repaint would do the trick - but no such luck. I do not understand why simply displaying a msgbox would fix the problem and I would like to eliminate it as it is just an unneeded click. Anyone have any clues? TerryK |
Form will not refresh without an unneeded msgbox
Hi TerryK,
May I ask which version of XL are you using and let us have the code(not need whole code, but the issue may has been hidden in there.) --- Message posted from http://www.ExcelForum.com/ |
Form will not refresh without an unneeded msgbox
Hi Terry,
Have you used repaint method in userform's Activate event after your stuff? Regards, Shah Shailesh http://members.lycos.co.uk/shahweb/ *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Form will not refresh without an unneeded msgbox
The suggestion from Shah Shailesh did not work (seems like it should) so here is the code from the spreadsheet module that reloads the userform (Inputform)
Private Sub CommandButtonEditQuote_Click() Load FormInput FormInput.UserForm_Activate FormInput.ReloadQuotetoInputForm 'the sub above reloads the info to the form and runs the calculations FormInput.Show (0) 'if I do not include the msgbox below - the form view is incorrect-calculations are not run Response = MsgBox("Quote has been successfully reloaded for editing", vbOK) End Sub Thanks to both of you for your suggestions. TerryK |
Form will not refresh without an unneeded msgbox
Terry,
Seems you're going a long way round to do what you want. Private Sub CommandButtonEditQuote_Click() FormInput.Show End Sub In FormInput: Private Sub UserForm_Activate() FormInput.ReloadQuotetoInputForm End Sub HTH Henry "TerryK" wrote in message ... The suggestion from Shah Shailesh did not work (seems like it should) so here is the code from the spreadsheet module that reloads the userform (Inputform) Private Sub CommandButtonEditQuote_Click() Load FormInput FormInput.UserForm_Activate FormInput.ReloadQuotetoInputForm 'the sub above reloads the info to the form and runs the calculations FormInput.Show (0) 'if I do not include the msgbox below - the form view is incorrect-calculations are not run Response = MsgBox("Quote has been successfully reloaded for editing", vbOK) End Sub Thanks to both of you for your suggestions. TerryK |
Form will not refresh without an unneeded msgbox
Henry,
BINGO! Worked perfectly. That was so simple and efficient I would have never found it on my own. Thanks TerryK |
All times are GMT +1. The time now is 11:39 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com