'Can't figure out how to make ".EntireRow.Delete" delete a Cell in another worksheet [closed]
I can't make this work. I've tried everything! .EntireRow.Delete has so far only worked when i used .Select to choose cell 33,2 but due to what I want the code to do, select does not actually work inside the application. This isnt about just one cell, i simplified the problem, in reality i use a variable instead of "33" and a lot of other code around it. But even testing just this line, it does not work. It doesnt work if i use .Range("B36") either. This code is launched from a Userform and the user isnt even supposed to see whats happening.
Workbooks("Excel Stock System.xlsm").Worksheets("DataNews_Events").Cells(33, 2).EntireRow.Delete
Whats wrong with this line? I've been trough plenty of threads online and people seem to use .EntireRow.Delete just like this.
Solution 1:[1]
ok guys,.. I got frustrated enough to delete my entire Sub and then the error remained and i realized , i had done nothing wrong, Excel had stopped working properly. Restarted it everything works now. I feel so stupid wasting 1,5 hour of my life wasted away because of a Excel bug.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Amelung Schwenke |