PC Review


Reply
Thread Tools Rate Thread

Administration Form with Radio Controls

 
 
Tim Childs
Guest
Posts: n/a
 
      16th Oct 2009
Hi

If I have an administration form in Excel that I want to send to colleagues
with radio buttons to select choices, how can I run a control process to
ensure that for the various items, the user has selected a choice for each
area i.e. that no area has simply been missed?

If possible, a simple robust process would be preferable.

Many thanks

Tim


 
Reply With Quote
 
 
 
 
Tim Childs
Guest
Posts: n/a
 
      17th Oct 2009
Hi Joel

Many thanks for posting this which I will be trying out on the sheet.

Best wishes

Tim

"joel" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> This is not easy. I assume each set of radio buttons are in a Group
> box. You can't find out which radio buttons are in each group box but
> you can find which Group box a button is located. This is a 3 step
> process.
>
> 1) Get the names of each group box and set the status of the Group box
> to False indicating no radio buttons where found to be set.
> 2) Find all the radio buttons and get the Group box name and the Value
> (checked or not checked). then if check change the status of the group
> to True
> 3) then check all the Group boxes t find out if they are true or
> false.
>
>
> Sub TestGroups()
> Dim Groups()
> GroupCount = 0
>
> 'create an array of all the group boxes on the sheet
> 'first item is group name
> For Each shp In ActiveSheet.Shapes
>
> If shp.FormControlType = xlGroupBox Then
> ReDim Preserve Groups(0 To GroupCount, 0 To 1)
> Groups(GrouCount, 0) = shp.OLEFormat.Object.Name
> 'set value to false indicating not initialized
> Groups(GrouCount, 0) = shp.OLEFormat.Object.Name
> Groups(GrouCount, 1) = False
> GroupCount = GroupCount + 1
> End If
> Next shp
>
> 'now get all the control buttons
> For Each shp In ActiveSheet.Shapes
>
> If shp.FormControlType = xlOptionButton Then
> GroupName = shp.OLEFormat.Object.GroupBox.Name
>
> If shp.OLEFormat.Object.Value = 1 Then
> 'find group name and set to true
> For i = 0 To UBound(Groups, 1)
> If Groups(i, 0) = GroupName Then
> Groups(i, 1) = True
> Exit For
> End If
> Next i
> End If
> End If
> Next shp
>
> 'display the groups not initialized
> For i = 0 To UBound(Groups, 1)
> If Groups(i, 1) = False Then
> MsgBox (Groups(i, 0) & " Has no value set")
> End If
> Next i
>
>
> End Sub
>
>
> --
> joel
> ------------------------------------------------------------------------
> joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
> View this thread:
> http://www.thecodecage.com/forumz/sh...d.php?t=145165
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using radio button controls in a Word form Nellie Microsoft Word Document Management 5 1st Apr 2010 01:17 PM
Parental Controls ~ administration on another vista PC =?Utf-8?B?SmFjaw==?= Windows Vista Administration 0 29th Oct 2006 04:33 PM
disabling controls by checking off a radio button when the form loads helpful sql Microsoft Dot NET 8 1st Apr 2006 05:35 PM
disabling controls by checking off a radio button when the form loads helpful sql Microsoft C# .NET 8 1st Apr 2006 05:35 PM
disabling controls by checking off a radio button when the form loads helpful sql Microsoft VB .NET 8 1st Apr 2006 05:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:17 AM.