in the Immediate window I enter: userform1.show vbmodeless
and the userform is displayed complete with its label, as expected.
On the other hand when I have the same command in my procedure the Userform displays but the label is not visible.
If I watch the expression userform1.Visible the problem persists but if I set the watch to "Break when value changes" the label displays with the userform.
So it seems like I need to do something to encourage Excel to draw the label before the next bit of code operates.
Not sure if this is relevant but my initialise code is:
Gavin
and the userform is displayed complete with its label, as expected.
On the other hand when I have the same command in my procedure the Userform displays but the label is not visible.
If I watch the expression userform1.Visible the problem persists but if I set the watch to "Break when value changes" the label displays with the userform.
So it seems like I need to do something to encourage Excel to draw the label before the next bit of code operates.
Not sure if this is relevant but my initialise code is:
Code:
Private Sub UserForm_Initialize()
GoTo skipped 'is this stopping display of label?
If ActiveSheet.Cells(1.1).Value = 1 Then
Me.Controls("SubtotalsWarning").Caption = "Preparing sheet for first use - this could take a while :(" & Chr(10) & "You are advised to save the workbook after the process has finished so that it is ready for use when you next open it. "
Else
Me.Controls("SubtotalsWarning").Caption = "Adding or Removing Sub-totals - This may take a few minutes as you have a large worksheet."
End If
skipped:
Me.startupposition = 0
Me.Top = 100
Me.Left = Application.Left + 50
End Sub
Gavin