Hello SamT,
Thank you for your comments. Your suggestion doesn't appear to work - not sure why you changed some of the original code ? The code I provided works as intended. To put it into context, I have given the full code below:
Thus to summarize, the toggle changes between red and green to signify the range is either locked or unlocked. (Note: if you're wondering, I wanted to use a shape as a toggle button so that I could alter its colour. The code here is adapted from a post I found - perhaps it could be more succinct, as I changed it to avoid having text being part of the toggle).
First and foremost I need the cell selection after the toggle to be general, ie. for any combination of FreqDay and StartDay. I only gave "3" and "5" as an example in my previous post.
I figured it reasonable to use the single line of code you suggested (rng.find(what.....) but when executed it simply throws up a msgbox with the number 400.
So to reiterate, what I want is EITHER:
1. after the toggle button is pressed back to the lock position, the cursor is placed in the cell corresponding to the StartDay. In other words, cell "g49" plus the StartDay integer.
OR
2. as mentioned previously, find the first unlocked cell in the range "g49:g188" and select it.(your line of code gives a msg box with the value "400" in it; interestingly, i tried other similar codes to find and select the first unlocked cell and they gave the same result??)
Thanks again for any helpful advice...
Bookmarks