View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tim[_39_] Tim[_39_] is offline
external usenet poster
 
Posts: 71
Default don't understand whats wrong with this userform

I would like to display a 'waiting' / 'working' warning after clicking a
button on a userform. i know this can be done in several ways, but as the
userform was there anyway, i thought the easiest would just be to have a
text box ("Working - Please Wait...") to be made visible after clicking the
<OK button (the userform staying open until all actions completed).

the textbox is made invisible using [SaveForm1.Label8.Visible = False] when
the form is initialised; my problem is that i can't make it visible again
(except when i put [msgbox label8.caption] after [SaveForm1.Label8.Visible =
True]. how could i get this to work? The code is below.

Many thanks,

Tim


Private Sub CommandButton2_Click()

'SaveForm1.Label8.ZOrder (0) <-- the textbox is on top anyway - this didn't
make any difference
SaveForm1.Label8.Visible = True
Application.ScreenUpdating = True

Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile(ActiveWorkbook.Path & "\site.ini", True)
a.WriteLine (ComboBox4.Text)
a.Close

Sheets("Parameters").Range("e3") = TextBox3.Text
ActiveWorkbook.SaveAs TextBox1.Text & TextBox3.Text



SaveForm1.Hide
Unload SaveForm1
MsgBox TextBox3.Text & " is Saved"

End Sub