Hi all,
I am writing a simple macro to conditionally copy some data from one workSheet to another workSheet in the same Excel file.
Here is the code:
Dim KWS As Worksheet
Dim JWS As Worksheet
Set KWS = Worksheets("Kitty")
Set JWS = Worksheets("Jan")
For x = beginning_cell To 5
If KWS.Cells(x, 8).Value = JWS.Cells(1, 8).Value Then
Sheets("Kitty").Select
KWS.Range(Cells(x, 1), Cells(x, 18)).Copy
Sheets("Jan").Select
JWS.Range("A"&x).PasteSpecial
Application.CutCopyMode = False
End If
Next x
When the code is executed, I saw the screen was blinking with two worsheets kept switching.
Is it possible to make the screen focus on the Kitty worksheet while the code is excuting? I don't want to see the screen blinking.
I am new to macro programming.
Please help and advise.
Thanks
Kitty
Bookmarks