Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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/

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 114
Default 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!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default 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





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
removing unneeded information Cal New Users to Excel 2 March 31st 09 01:39 AM
Change and refresh OLEObject showing Excel chart on Access form. Chrisso Charts and Charting in Excel 0 December 23rd 08 04:57 PM
Deleting unneeded rows and columns mbing916 Excel Discussion (Misc queries) 1 May 1st 07 07:08 PM
How to delete unneeded colums in a sheet erwinke New Users to Excel 6 July 31st 06 11:53 AM
Pivot Table REFRESH Flaw -- Saves Old Data in Selection Area AFTER REFRESH Ken Roberts Excel Programming 3 September 11th 03 06:02 AM


All times are GMT +1. The time now is 11:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"