Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refreshing a form

Status
Not open for further replies.

simoncpage

Programmer
Apr 4, 2002
256
GB
hi all

How do I update/refresh a form automatically? for example

---------------------------------------
For Each sht In ActiveWorkbook.Sheets

frmHeader.lblsheetadd.Caption = "Sheet " & counter & " is being deleted"
counter = counter - 1

With sht.PageSetup
.LeftHeader = ""
.RightHeader = ""
.CenterHeader = ""
End With

Next sht

--------------------------------
how do i get the above to show the form counting down the sheets as all i see is a blank with the above

Thanks

Simon
 
Is this code part of an event handler within the frmHeader code module?
Rob
[flowerface]
 
Rob hi

The code is in the Userform_Activate() procedure (all in the form module).

thanks
Simon

 
I think the problem may be that during the activate procedure, the userform is not yet officially "active". Not sure, though. You should need no explicit code to refresh a form - it should happen by itself. Just to test it, try to put your code in a different event handler (e.g. the click event for a temporary button) and see if it works for you then.
Rob
[flowerface]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top