View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Form won't update!

Sometimes, you can repaint the form after you show the control.

sub Commandbutton1_click()
me.label222.visible = true
me.repaint
end sub

Sometimes, it helps if you add a "doevents" to the code:

sub Commandbutton1_click()
me.label222.visible = true
doevents
me.repaint
end sub

Graham Y wrote:

I have an form that works fine, after I click the OK button, it saves the
file. However this takes a while so I wanted to display a message 'Saving
File' I started by adding a lable, with the text, and setting it's visible
property yo false, and then when the buttonis clicked set it to true. I have
tried various ideas on this theme and to no avail. the only way I can get
such updates to work is by adding a call to display a msgbox, in the next
line of code.

How do I get around this?
Displaying the msgbox, requires user intervention, although I am sure I
could use a timer to get rid of it. But either way it seems wrong!

Graham


--

Dave Peterson