Macro works on one computer but not another

Tifa

New Member
Joined
Dec 15, 2020
Messages
10
Office Version
  1. 2019
Platform
  1. Windows
I have a simple macro it works fine on other computers with office 2016 (on windows 7 & 10 64x) but on my laptop also 64x, with office 2019 it was very strang some times it works, and most of the time I receive a 1004 error and when I debug it shows error at this line "ActiveSheet.Pictures.Paste.Select"

I tried to erase my office version on my laptop and installed office 2016 but same behavior, I tried to install office 2019 32x and 64x also same behavior, I checked tools>references on other working laptop they are the same as mine!! I even tried to repair C++ redistributable installations from the control panel

how could I solve this issue?

VBA Code:
Sub Copy_Data_from_DropDownMenus_to_table()

Range("A2").Select
    Range(Selection, Selection.End(xlToRight)).Select
    Selection.Copy
    Range("A10").Select
    Selection.End(xlDown).Select
    ActiveCell.Offset(1, 0).Range("A1").Select
    Selection.PasteSpecial Paste:=xlPasteValues
       
    Application.CutCopyMode = False
   
    With Selection
        .Borders(xlEdgeLeft).LineStyle = xlContinuous
        .Borders(xlEdgeTop).LineStyle = xlContinuous
        .Borders(xlEdgeBottom).LineStyle = xlContinuous
        .Borders(xlEdgeRight).LineStyle = xlContinuous
        .Borders(xlInsideVertical).LineStyle = xlContinuous
        .Borders(xlInsideHorizontal).LineStyle = xlContinuous
    End With
   
   Application.CutCopyMode = False
  
  
   Range("L2").Select
    Selection.Copy
    Range("L10").Select
    Selection.End(xlDown).Select
    ActiveCell.Offset(0, 0).Range("A1").Select
    
    ActiveSheet.Pictures.Paste.Select                     
    Application.CutCopyMode = False
   
    Range("A2").Select


end sub
 
Last edited by a moderator:

Some videos you may like

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

JLGWhiz

Well-known Member
Joined
Feb 7, 2012
Messages
12,979
Office Version
  1. 2013
Platform
  1. Windows
Lose the '.Select'.
Excel Formula:
ActiveSheet.Pictures.Paste
 

Tifa

New Member
Joined
Dec 15, 2020
Messages
10
Office Version
  1. 2019
Platform
  1. Windows
I read on Microsoft that some applications can interfere with the VBA code, I started ending background applications I found that the one causing the error is Ditto which is a clipboard application.


now everything is working fine.

Thanks
 
Solution

Watch MrExcel Video

Forum statistics

Threads
1,127,554
Messages
5,625,474
Members
416,109
Latest member
TripleA00123

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
Top