#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Surveys

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Surveys

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
surveys and pivot tables jcontrer Charts and Charting in Excel 2 November 1st 07 07:34 PM
Tabulating Multiple Surveys in Excel Chuck Excel Discussion (Misc queries) 0 March 28th 07 02:46 AM
Tabulating Multiple Surveys in Excel Gary''s Student Excel Discussion (Misc queries) 0 March 28th 07 01:50 AM
Surveys and percentages Dr.Boo Charts and Charting in Excel 2 August 1st 06 08:53 AM
Post-versus Pre-surveys scatter plot chart DSR Charts and Charting in Excel 1 June 5th 05 12:54 PM


All times are GMT +1. The time now is 02:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"