Load data back into userform - radio buttons and checkboxes

Storm8585

New Member
Joined
Sep 5, 2014
Messages
47
Hi all
Help needed again! I have a userform which includes grouped radio buttons and checkboxes. The form needs to load and save data between sessions. Short of coding each radio box result to an individual cell somewhere, I was hoping to just store the caption name of the selected radio button to a single cell. Then when the form is loaded up again, the code will find the group name, then check the cell for the value which corresponds to the radio button captions and set it to true. I can do the download part - but not the upload bit! Also is there something similar for checkboxes??
Any help greatly appreciated.
 
first two code in #post 9 look remarkably like codes I have posted in past for others here.

They are not the issue - Did you follow the instructions I gave in my #post 5 & place all the code unaltered in code modules directed?

The Main code goes in a STANDARD module

The other two codes go in the USERFORMS code page
You must not change the names of these events to match your userforms name

If you are still having issues, place copy of your workbook (with sensitive data removed) in a dropbox & provide link to.


Dave
 
Upvote 0

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Hi Dave

I put the main code in a new standard module.

I already have a UserForm_Initialize() event, and so I incorporated your line of code into it.

With the second bit of code, I did not have an event called UserForm_QueryClose, and so I just pasted the full code into the Userform1 module.

Is this correct. When I click the update record button on the userform, nothing happens - it doesn't paste the information from any of the option buttons.
 
Upvote 0
when you close the form, all the desired control settings are saved to the registry - when you open the form, the control values are retrieved & your form should display to their last setting. This is all the code does - If you are wanting to save control values to update your worksheet then you are looking at the wrong code.

If still having difficulty, Place copy of your workbook in a dropbox

Dave
 
Upvote 0
Aaah, yes - in that case it does exactly what you say it does! It was my mistake for describing it badly. Yes, I was trying to get the caption from the selected option button in each group to update to the database sheet! Let me see if I can figure it out! Thank you again for your help!
 
Upvote 0
Aaah, yes - in that case it does exactly what you say it does! It was my mistake for describing it badly. Yes, I was trying to get the caption from the selected option button in each group to update to the database sheet! Let me see if I can figure it out! Thank you again for your help!

I have gone through my archives & I did indeed assist with the original code - what you have here is an adapted version of it - If still having issues suggest you start your own thread & with complex projects, always helpful if you can place copy in a dropbox - likely to get more responses.

Dave
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,720
Members
448,986
Latest member
andreguerra

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top