I have a very strange problem with excel vba. I have narrowed the problem down and made this code to represent the problem as simply as possible.
Sub Button1_Click()
Button1_Click Macro
Range("A1:B17").Select
Selection.Copy
Workbooks.Add
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub
On most computers I have no issue, but in the company we have two new laptops that give me the following error message on ActiveSheet.Paste row.
Run time error '1004'
Paste method of Worksheet class failed
I have tested this on both Windows 10 and 7, and on different computers. Only ones causing problems are the two new ones with Win10.
I saw this thread, and also tried the last option there about adding delays within the code:
Run Time Error '1004': Paste Method Of worksheet Class Failed error
Any suggestions how to solve this, and/or what is causing this issue?
-Rasmus-