Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have developed a template with survey questions for
responses on a scale of 1 to 5. I would like to tally eaach question/row once an option button is selected and than create a sume of these questions. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
for each question: Add a groupbox from the Forms toolbar. Add 5 optionbuttons
(also from the forms toolbar) completely within that groupbox. Rightclick on any of the option buttons and choose format control. Then on the control tab, select a nice linked cell (on the same row??). Alternatively, you could add 5 optionbuttons from the controltoolbox toolbar. But then you'll have to change the Groupname (rightclick|properties) to something unique for each set of 5 optionbuttons. Here's some code that you could use if you want to lay out the buttons/groupboxes from the Forms toolbar: Option Explicit Sub testme01() Dim grpBox As GroupBox Dim optBtn As OptionButton Dim maxBtns As Long Dim myCell As Range Dim myRange As Range Dim wks As Worksheet Dim i As Long maxBtns = 5 Set wks = ActiveSheet With wks Set myRange = .Range("c4:c9") myRange.EntireRow.RowHeight = 28 myRange.Resize(, maxBtns).EntireColumn.ColumnWidth = 4 .GroupBoxes.Delete .OptionButtons.Delete End With For Each myCell In myRange With myCell.Resize(1, maxBtns) Set grpBox = wks.GroupBoxes.Add _ (Top:=.Top, Left:=.Left, Height:=.Height, _ Width:=.Width) grpBox.Caption = "" End With For i = 0 To maxBtns - 1 With myCell.Offset(0, i) Set optBtn = wks.OptionButtons.Add _ (Top:=.Top, Left:=.Left, Height:=.Height, _ Width:=.Width) optBtn.Caption = "" If i = 0 Then optBtn.LinkedCell = myCell.Offset(0, -1).Address End If End With Next i Next myCell End Sub Enrique wrote: I have developed a template with survey questions for responses on a scale of 1 to 5. I would like to tally eaach question/row once an option button is selected and than create a sume of these questions. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
surveys and pivot tables | Charts and Charting in Excel | |||
Tabulating Multiple Surveys in Excel | Excel Discussion (Misc queries) | |||
Tabulating Multiple Surveys in Excel | Excel Discussion (Misc queries) | |||
Surveys and percentages | Charts and Charting in Excel | |||
Post-versus Pre-surveys scatter plot chart | Charts and Charting in Excel |