It looked easy but I can't make it work so I think I'm doing wrong somewhere.
I have setup a userform on which I have a combobox that everytime it changes
I write its text value to the cell I was in, when I fired up the form (target).
The form is shown when I double click in a certain sheet and before I show it, I have these settings
to be able to share the variables across different modules:
In a module I have these declarations:
Now I'm trying to add a "Next line" button and I would like that when I click on it
the selection should move to the cell right below the original target.
I would also need to update the "trg" and the "trgQty" variables so that the other subs
that use them will be able to point to the newly selected cell.
To do that I put this code in the click event of the "Next line" button:
but it does not work.
I did that because in the click event of an "OK" button I have on the form
I put this code
and, if the next line is empty, the selection moves there correctly.
Hope somebody can help.
Thanks.
Bookmarks