Hi,
I have a userform with a listbox. When the user selects a value from the listbox, the userform closes and a cell on the spreadsheet is automatically selected.
This works as intended, but with the following problem shown in this example:
- The currently selected cell is B3
- The user opens the form, selects a value from the listbox.
- The form closes and D5 is selected with VBA code.
- The user starts typing, but the text is being written in cell B3 (the previously selected cell), and with that cell's formats.
- When the user presses return or deselects the cell, the text correctly appears in cell D5, but still has the formats from cell B3.
I have no idea why this is happening and have tried different combinations of things e.g:
- putting 'unload me' before and after the cell selection.
- selecting the cell twice.
- enabling / disabling events before and / or after the cell selection.
I would love some ideas!
Thanks very much.
Bookmarks