Hi,
I could not find the solution to this problem anywhere. I am building a worksheet, and one of the features it needs to do is to hide or unhide certain columns when a certain macro is triggered. I tried using a simple code below (which works in another workbook) but it behaves strangely in the workbook:
When I use the debugger, and columns are initially hidden, the code will pass through lines 1-4. This results in unhiding the columns. However, the sub ends right then, and line 5 is never highlighted. If I click "F8" again, it goes to line 1. This time, when I keep clicking "F8", it reaches line 8, executes the code (hides the columns) and then exits the sub again. If I click "F8" again, it will go to line 1.Please Login or Register to view this content.
How can I fix it so that the code does not get cut off after executing a statement and continues with the rest of the macro?
Thank you!
Bookmarks