Hi there,
I have the following problem. I have a macro that hides certain lines to allow easier input when those lines are not required. Part of these lines are combo boxes. It all works fine until a special case arises: The combo box has been changed and the button to initiate the hide function is click straight away while the combo box is still selected. In this case excel crashes and needs to be restarted. The problem can be simulated manually using the hide function in excel directly.
The solution is easy as well, just click in a cell before hitting the button works and no conflicts arise.
I tried to use:
Sheets().Range().Select
in the macro, however, it selects the cell, but still does not stop excel from crashing. (When I do it manually, no problem, but in code it does not work). The steps get not recorded when using the record macro function :-(
Question: What would be the appropriate code sequence to solve this?
Cheers
Jochen
I have the following problem. I have a macro that hides certain lines to allow easier input when those lines are not required. Part of these lines are combo boxes. It all works fine until a special case arises: The combo box has been changed and the button to initiate the hide function is click straight away while the combo box is still selected. In this case excel crashes and needs to be restarted. The problem can be simulated manually using the hide function in excel directly.
The solution is easy as well, just click in a cell before hitting the button works and no conflicts arise.
I tried to use:
Sheets().Range().Select
in the macro, however, it selects the cell, but still does not stop excel from crashing. (When I do it manually, no problem, but in code it does not work). The steps get not recorded when using the record macro function :-(
Question: What would be the appropriate code sequence to solve this?
Cheers
Jochen