Hi all,
After having been helped at one part of my project, I am now stuck at another one. Please have a look at the attachment (I have tried to keep it as simple as possible by removing everything not related). "Button1" triggers the creation of the buttons
The final file will contain an unknown amount of rows/columns, with, as header, ID / TEXT1 / TEXT2 / TEXT... (Around 300k cells total)
The final user will have to count how many words are in the cells of a specific column (he may need to do it for other columns as well).
My approach is the following:
1-Find the header, and convert each of its cells into individual buttons (one per column, each button automatically fitting in the cell)
Sub Create_Buttons()
-->Done, an issue may exist
2- When the user click on one of these buttons, a column is added on the right, each cell being filled up with the number of words in the cell on the right (thank you for the previous help)
Sub WordsPerCell_Button()
-->Partially done
Problem:
When I click on a "TEXT..." button, I expected this button to become the ActiveCell, so that:
- the length of the column would be measured (no empty cell)
- the rank of the column would be picked up before inserting a column to its right
Now, it is not working this way. ActiveCell is actually the one selected before clicking on the button.
I've found on the forum and the help several references to SetFocus and TakeFocusOnClick, but I have not been able to use them properly so that the ActiveCell will be the one with the button.
Any help would be very much appreciated.
Thank you.
WordsPerCell.xlsm
Bookmarks