screen keeps flickering and flashing why using macro

markswan111

New Member
Joined
Sep 16, 2016
Messages
33
Dear Sir,
I have this macro, and I am using screen updating =false command to stop screen updating, however it is still flickering and flashing when using the macro.
I am using windows 10 and excel 2019

this is the macro format:

Sub Macro6()
'
' Macro6 Macro
'

'

Application.ScreenUpdating = False


Windows("1.xlsb").Activate
Sheets("ÕäÏæÞ+ÇäÊÇÌ+ãÓÊæÏÚÇÊ+ãÈíÚÇÊ").Select
Range("B9:D9").Select
Selection.Copy
Windows("ODELIS22023.xlsb").Activate
Range("D3:F3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

Application.ScreenUpdating = False


Windows("1.xlsb").Activate
Range("E9").Select
Application.CutCopyMode = False
Selection.Copy
Windows("ODELIS22023.xlsb").Activate
ActiveWindow.SmallScroll ToRight:=-4
Range("K3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

Application.ScreenUpdating = False


Windows("1.xlsb").Activate
Range("F9:G9").Select
Application.CutCopyMode = False
Selection.Copy
Windows("ODELIS22023.xlsb").Activate
Range("M3:N3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

Application.ScreenUpdating = False


Windows("1.xlsb").Activate
Range("H9:J9").Select
Application.CutCopyMode = False
Selection.Copy
Windows("ODELIS22023.xlsb").Activate


Windows("1.xlsb").Activate
Range("H9").Select
Application.CutCopyMode = False
Selection.Copy
Windows("ODELIS22023.xlsb").Activate
Range("AP3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.SmallScroll ToRight:=-3
Windows("1.xlsb").Activate
Range("I9:J9").Select
Application.CutCopyMode = False
Selection.Copy
Windows("ODELIS22023.xlsb").Activate
Range("AT3:AU3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Windows("1.xlsb").Activate
ActiveWindow.SmallScroll ToRight:=-8
Range("K9").Select
Application.CutCopyMode = False
Selection.Copy
Windows("ODELIS22023.xlsb").Activate
Range("AV3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.SmallScroll ToRight:=-7
Windows("1.xlsb").Activate
Range("L9:P9").Select
Application.CutCopyMode = False
Selection.Copy
Windows("ODELIS22023.xlsb").Activate
Range("AW3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Windows("1.xlsb").Activate
Range("Q9").Select
Application.CutCopyMode = False
Selection.Copy
Windows("ODELIS22023.xlsb").Activate
ActiveWindow.SmallScroll ToRight:=-4
Range("BB3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False


Windows("1.xlsb").Activate
Range("R9").Select
Application.CutCopyMode = False
Selection.Copy
Windows("ODELIS22023.xlsb").Activate
ActiveWindow.SmallScroll ToRight:=-4
Range("C3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False


Application.ScreenUpdating = True

End Sub



thank you all in advance
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Try replacing your VBA code with the below and see if this resolves it for you.

VBA Code:
Sub Macro6()


    Application.ScreenUpdating = False

    Dim wbSource As Workbook
    Dim wbDest As Workbook
    
    Set wbSource = Workbooks("1.xlsb")
    Set wbDest = Workbooks("ODELIS22023.xlsb")
    
    wbSource.Sheets("ÕäÏæÞ+ÇäÊÇÌ+ãÓÊæÏÚÇÊ+ãÈíÚÇÊ").Range("B9:D9").Copy
    wbDest.Sheets(1).Range("D3:F3").PasteSpecial xlPasteValues
    
    wbSource.Sheets(1).Range("E9").Copy
    wbDest.Sheets(1).Range("K3").PasteSpecial xlPasteValues
    
    wbSource.Sheets(1).Range("F9:G9").Copy
    wbDest.Sheets(1).Range("M3:N3").PasteSpecial xlPasteValues
    
    wbSource.Sheets(1).Range("H9:J9").Copy
    wbDest.Sheets(1).Range("AP3").PasteSpecial xlPasteValues
    
    wbSource.Sheets(1).Range("I9:J9").Copy
    wbDest.Sheets(1).Range("AT3:AU3").PasteSpecial xlPasteValues
    
    wbSource.Sheets(1).Range("K9").Copy
    wbDest.Sheets(1).Range("AV3").PasteSpecial xlPasteValues
    
    wbSource.Sheets(1).Range("L9:P9").Copy
    wbDest.Sheets(1).Range("AW3").PasteSpecial xlPasteValues
    
    wbSource.Sheets(1).Range("Q9").Copy
    wbDest.Sheets(1).Range("BB3").PasteSpecial xlPasteValues
    
    wbSource.Sheets(1).Range("R9").Copy
    wbDest.Sheets(1).Range("C3").PasteSpecial xlPasteValues
    
    Application.ScreenUpdating = True
    
End Sub
 
Upvote 0
Try replacing your VBA code with the below and see if this resolves it for you.

VBA Code:
Sub Macro6()


    Application.ScreenUpdating = False

    Dim wbSource As Workbook
    Dim wbDest As Workbook
   
    Set wbSource = Workbooks("1.xlsb")
    Set wbDest = Workbooks("ODELIS22023.xlsb")
   
    wbSource.Sheets("ÕäÏæÞ+ÇäÊÇÌ+ãÓÊæÏÚÇÊ+ãÈíÚÇÊ").Range("B9:D9").Copy
    wbDest.Sheets(1).Range("D3:F3").PasteSpecial xlPasteValues
   
    wbSource.Sheets(1).Range("E9").Copy
    wbDest.Sheets(1).Range("K3").PasteSpecial xlPasteValues
   
    wbSource.Sheets(1).Range("F9:G9").Copy
    wbDest.Sheets(1).Range("M3:N3").PasteSpecial xlPasteValues
   
    wbSource.Sheets(1).Range("H9:J9").Copy
    wbDest.Sheets(1).Range("AP3").PasteSpecial xlPasteValues
   
    wbSource.Sheets(1).Range("I9:J9").Copy
    wbDest.Sheets(1).Range("AT3:AU3").PasteSpecial xlPasteValues
   
    wbSource.Sheets(1).Range("K9").Copy
    wbDest.Sheets(1).Range("AV3").PasteSpecial xlPasteValues
   
    wbSource.Sheets(1).Range("L9:P9").Copy
    wbDest.Sheets(1).Range("AW3").PasteSpecial xlPasteValues
   
    wbSource.Sheets(1).Range("Q9").Copy
    wbDest.Sheets(1).Range("BB3").PasteSpecial xlPasteValues
   
    wbSource.Sheets(1).Range("R9").Copy
    wbDest.Sheets(1).Range("C3").PasteSpecial xlPasteValues
   
    Application.ScreenUpdating = True
   
End Sub
Dear Sir,
I just tried it, It worked but only the first command transferred data, the rest did not work

this one only transferred data, the rest did not transfer any data at all and left a blank cell in the WBDEST WORKBOOK


wbSource.Sheets("ÕäÏæÞ+ÇäÊÇÌ+ãÓÊæÏÚÇÊ+ãÈíÚÇÊ").Range("B9:D9").Copy
wbDest.Sheets(1).Range("D3:F3").PasteSpecial xlPasteValues
 
Upvote 0
Ok, try this.

VBA Code:
Sub Macro6()
    Application.ScreenUpdating = False
    
    Dim src As Workbook, dest As Workbook
    Set src = Workbooks("1.xlsb")
    Set dest = Workbooks("ODELIS22023.xlsb")
    
    dest.Sheets("Sheet1").Range("D3:F3").Value = src.Sheets("ÕäÏæÞ+ÇäÊÇÌ+ãÓÊæÏÚÇÊ+ãÈíÚÇÊ").Range("B9:D9").Value
    dest.Sheets("Sheet1").Range("K3").Value = src.Range("E9").Value
    dest.Sheets("Sheet1").Range("M3:N3").Value = src.Range("F9:G9").Value
    dest.Sheets("Sheet1").Range("AP3").Value = src.Range("H9").Value
    dest.Sheets("Sheet1").Range("AT3:AU3").Value = src.Range("I9:J9").Value
    dest.Sheets("Sheet1").Range("AV3").Value = src.Range("K9").Value
    dest.Sheets("Sheet1").Range("AW3").Value = src.Range("L9:P9").Value
    dest.Sheets("Sheet1").Range("BB3").Value = src.Range("Q9").Value
    dest.Sheets("Sheet1").Range("C3").Value = src.Range("R9").Value
    
    Application.ScreenUpdating = True
End Sub
 
Upvote 0
Solution
Ok, try this.

VBA Code:
Sub Macro6()
    Application.ScreenUpdating = False
  
    Dim src As Workbook, dest As Workbook
    Set src = Workbooks("1.xlsb")
    Set dest = Workbooks("ODELIS22023.xlsb")
  
    dest.Sheets("Sheet1").Range("D3:F3").Value = src.Sheets("ÕäÏæÞ+ÇäÊÇÌ+ãÓÊæÏÚÇÊ+ãÈíÚÇÊ").Range("B9:D9").Value
    dest.Sheets("Sheet1").Range("K3").Value = src.Range("E9").Value
    dest.Sheets("Sheet1").Range("M3:N3").Value = src.Range("F9:G9").Value
    dest.Sheets("Sheet1").Range("AP3").Value = src.Range("H9").Value
    dest.Sheets("Sheet1").Range("AT3:AU3").Value = src.Range("I9:J9").Value
    dest.Sheets("Sheet1").Range("AV3").Value = src.Range("K9").Value
    dest.Sheets("Sheet1").Range("AW3").Value = src.Range("L9:P9").Value
    dest.Sheets("Sheet1").Range("BB3").Value = src.Range("Q9").Value
    dest.Sheets("Sheet1").Range("C3").Value = src.Range("R9").Value
  
    Application.ScreenUpdating = True
End Sub
Dear Chris, thank you much, it is resolved, you are the best:):)

Your are much appreciated
 
Last edited by a moderator:
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top