Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Beginner: Help with Checkboxes on created User Form
Hi. I'm basically teaching myself some VBA skills when I need them. So please, bear with me. I've created a user form for an Excel spreadsheet for fairly inexperienced users. I have combo boxes and text boxes that work perfectly well. However, I'm trying to add a check box and I guess I'm not quite sure how they work. Is the checkbox more an individual thing? Does it work in such a way that each item I want needs its own checkbox? My user form _might_ look something like this: Patient Name: (text box) Diagnosis: (combo box - list of 10) CoMorbidities: (checkbox - list of 9 things, more than one can be chosen) Basically, I was wondering if it would be possible to have a checkbox like this on a user form. Can I create something where you can select more than one option and then have it drop into my spreadsheet? I keep looking for this, but I'm not even aware if it's possible. Another question I have is that if my a user closes the form without clicking on the "enter data" or "close form" command buttons, a "compile error" occurs. Here's the code that I have (from an example I found): Private Sub UserForm_Click() (Cancel As Integer, _ CloseMode As Integer) If CloseMode = vbFormControlMenu Then Cancel = True MsgBox "Please use the button!" End If The part in parenthesis turns red after the error. Your patience and any help is appreciated. I hope I've provided enough information. Thank you in advance. Marianne -- MarianneR ------------------------------------------------------------------------ MarianneR's Profile: http://www.excelforum.com/member.php...fo&userid=6253 View this thread: http://www.excelforum.com/showthread...hreadid=475191 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to clear all checkboxes on a form? | Excel Worksheet Functions | |||
Copy checkboxes created with Excel97 | Excel Discussion (Misc queries) | |||
I created a form on excel. want to edit the form without printing | Excel Discussion (Misc queries) | |||
Beginner - Excel - Auto look up values from worksheet 3 from User | Excel Programming | |||
Beginner question: where to put code when form loads | Excel Programming |