ScreenUpdating not working.. Call Objects saved in XLA???
Hi,
I encounter a flickering problem with my program despite using
screenupdating. i suspect it is because I use select/activate, copy and paste
from different other worksheet which is seen as a LIBRARY. A sample of my
code is attached.
I wonder if it is possible to save the library in XLA and then call the
objects from XLA file using EXCEL VBA. Is it a better way of dealing the
flickering screen. If possible, i appreciate someone can tell me how to
accomplish it using Xla.
Look forward to your reply.
Best wishes, Loy
SAMPLE CODE
Public Sub OnshoreTrfr(ByVal myValue As Integer, myType As Integer)
Application.ScreenUpdating = False
Select Case myType
Case 1
If myValue = 1 Then
Sheets("LIB").Select
ActiveSheet.Shapes("Libon1x2wdgtrfr").Copy
Sheets("SLD").Select
ActiveSheet.Paste
Selection.Name = "onstrfr1x2wdg1"
Selection.Left = 904
Selection.Top = 299
End If
If myValue = 2 Then
Sheets("LIB").Select
ActiveSheet.Shapes("Libon1x2wdgtrfr").Copy
Sheets("SLD").Select
ActiveSheet.Paste
Selection.Name = "onstrfr1x2wdg1"
Selection.Left = 780
Selection.Top = 299
ActiveSheet.Paste
Selection.Name = "onstrfr1x2wdg2"
Selection.Left = 1030
Selection.Top = 299
End If
Case 2
....
End Select
Sheet1.Select
Application.ScreenUpdating = True
End Sub
|