View Single Post
 
Old 06-09-2019, 05:50 AM
kiwimtnbkr kiwimtnbkr is offline Windows 10 Office 2010 64bit
Advanced Beginner
 
Join Date: Oct 2017
Posts: 69
kiwimtnbkr is on a distinguished road
Default Falling at the last hurdle with Checkboxes and Option buttons

I am falling at the last hurdle and have spent the last two days trying to find an answer myself and feels like I have tried a million different lines of code without any success.

I have attached the in question troublesome spreadsheet template in the hopes it allows for a successful solution.

Upon opening the file, it is set up to hid the Excel application and draw the users attention to the Notes UserForm that pops up. So far so good.

And I apologise now for the use of SENDKEYS to turn NUMLOCK back on so if anyone knows a better way the enforce NUMLOCK on please feel free to adjust what you need to. The idea behind the use is to force the dropdown lists to appear without the User clicking on them.

My intent is that the user will read the notes first and then 'tick' the Check Box to 'agree' that they have done so. Next step is they select the 'Section' Option Button to designate what Section that belong to. This will then cause the Continue Command button to become active.
The idea behind the user selecting what Section they belong to is that it will 'unhide' the appropriate worksheet for that Section.

So far so good and I am happy with that - well sort of....

The issue starts if the User selects what Section they belong to first. This causes the Continue Command button to become active.

What I need the UserForm to do is not let the Continue button become active until they have 'ticked' the Check box to agree they have read the notes and also selected what Section they being to - regardless of what order they ultimately do it in.

The second issue is if the User selects the wrong Section and then tries to select the right Section and it causes the macro to error with a 'Run-time error '1004': Unable to set the Visible property of the Sheets class'. The workbook isn't protected and this one REALLY has me stuck.

And if anyone is really bored and wants something to do for a rainy day type of thing - please feel free to tidy up my poor coding efforts. There will be better ways of getting what I need done but I have just pieced together what I have been able to find online into something that works.

Many thanks
Mike
Attached Files
File Type: xltm Report Template v4.6.xltm (257.2 KB, 10 views)
Reply With Quote