Hi all, this is driving me completely crazy, i'm far from a vba expert, hope you can help.
So I have a workbook open with the following code behind a form control button.
It's supposed to create,name & save a new workbook and copy a range to it from a sheet (with a frozen pane) called MOM no named wsI in the code (stands for method of manufacture), then remove any blank rows.
I cant get it to remove the blank rows, i get a variation of error messages based around subscript out of range. I mention the frozen panes because It did briefly in a flaky way when i played around with freezing/unfreezing panes, but not robust enough to rely on, then it stopped.
It seems that when i create & save the new workbook (wbo) it is the active workbook as it is ontop of the original & is in focus but if i add a message box to return name of active workbook it shows (wbi). But whatever i do to try to make the right sheet active at the right time it doesn't work.
I don't mind going about it an entirely different way if anyone can suggest, all i want is a new workbook with the blank rows removed.
Many thanks in advance
VBA Code:
![]()
Please Login or Register to view this content.
Bookmarks