An implementation of Visual Basic that is built into Microsoft products.
Hello @Domenic Moscato ,
Thanks for your question.
Imagine Mrow as a sticky note holding the number 9. The code uses it to find drawer 9 on your screen and read the SecID label. However, due to a recent Excel update, the code accidentally erases this sticky note right after reading it, which breaks the rest of the process.
I recommend passing the code a "photocopy" of the sticky note instead. This keeps the original Mrow value safe. You can refer to these two options:
- Putting extra parentheses around the word Mrow forces Excel to make a quick photocopy. Change your SecID line to exactly this:
SecID = Trim(scr.Area((Mrow), 4, (Mrow), 12))
- You can create an actual temporary copy just before the step that fails. Update your code to look exactly like this:
Mrow = Mrow
scr.moveTo Mrow, 2, 1
Dim TempRow As Integer
TempRow = Mrow
SecID = Trim(scr.Area(TempRow, 4, TempRow, 12))
If SecID = "" Then
Please try these options and let me know the results. I would be happy to investigate further if needed.
I hope this addresses your question. If this response was helpful, please consider following the guidance to provide feedback.