G
Guest
Hello,
below is a sequence that I use to update a image(chart) on my userform.
Everytime a user presses this spinbutton the updated chart is loaded on the
userform. The problem I am trying to solve is that although I am using
"screenupdating=false" one can see how the userform is unloaded and then
reloaded. It happens in an instant but why does the screen change at all?
When the userform is hidden the workbook is displayed, would hiding the
workbook help here?
thanks for your help,
Özgür
Private Sub SpinButton92_Change()
Application.ScreenUpdating = False
Label259.Caption = SpinButton92.Value
Sheets("Org_Data").Range("B16") = SpinButton92.Value
Me.Hide
Call Chart
End Sub
Sub Chart()
Application.ScreenUpdating = False
Sheets("Org_Data").Select
ActiveSheet.ChartObjects("Chart 25").Activate
Call example
End Sub
Sub example()
Application.ScreenUpdating = False
ActiveChart.Export "temp.jpg", "JPG", True
UserForm2.Show
'Application.ScreenUpdating = True
On Error Resume Next
Unload UserForm2
Kill "temp.jpg"
On Error GoTo 0
End Sub
below is a sequence that I use to update a image(chart) on my userform.
Everytime a user presses this spinbutton the updated chart is loaded on the
userform. The problem I am trying to solve is that although I am using
"screenupdating=false" one can see how the userform is unloaded and then
reloaded. It happens in an instant but why does the screen change at all?
When the userform is hidden the workbook is displayed, would hiding the
workbook help here?
thanks for your help,
Özgür
Private Sub SpinButton92_Change()
Application.ScreenUpdating = False
Label259.Caption = SpinButton92.Value
Sheets("Org_Data").Range("B16") = SpinButton92.Value
Me.Hide
Call Chart
End Sub
Sub Chart()
Application.ScreenUpdating = False
Sheets("Org_Data").Select
ActiveSheet.ChartObjects("Chart 25").Activate
Call example
End Sub
Sub example()
Application.ScreenUpdating = False
ActiveChart.Export "temp.jpg", "JPG", True
UserForm2.Show
'Application.ScreenUpdating = True
On Error Resume Next
Unload UserForm2
Kill "temp.jpg"
On Error GoTo 0
End Sub