Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Visual Basic Code
Hi
I am currently working on a project to transfer application forms to a spread sheet, so far i have been able to add all data, but i am looking for a piece of program that will allow me to use a group of radio boxes (option boxes) to output a number rather than having the same number of cells and true only apearing in one of them thank you Robert Couchman |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Visual Basic Code
Robert,
This adds 5 option buttons For i = 1 To 5 With ActiveSheet.OLEObjects Set oCtl = .Add(ClassType:="Forms.OptionButton.1", _ Link:=False, _ DisplayAsIcon:=False, _ Left:=500, _ Top:=60 * i, _ Width:=200, _ Height:=32) oCtl.Object.Caption = "Option " & CStr(i) End With Next i -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Robert Couchman" wrote in message ... Hi, I am currently working on a project to transfer application forms to a spread sheet, so far i have been able to add all data, but i am looking for a piece of program that will allow me to use a group of radio boxes (option boxes) to output a number rather than having the same number of cells and true only apearing in one of them. thank you, Robert Couchman |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Visual Basic Code
Assuming optionbuttons are in a userform you could do something like this.
(don't tie any of the buttons to a cell) i = 0 for each ct in me.Controls if typeof ct is MSForms.OptionButton then i = i + 1 if ct.Value then Range("Whatever").Value = i exist for end if end if Next -- Regards, Tom Ogilvy "Robert Couchman" wrote in message ... Hi, I am currently working on a project to transfer application forms to a spread sheet, so far i have been able to add all data, but i am looking for a piece of program that will allow me to use a group of radio boxes (option boxes) to output a number rather than having the same number of cells and true only apearing in one of them. thank you, Robert Couchman |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Visual Basic Code hidden | Excel Discussion (Misc queries) | |||
repeating code in visual basic | Excel Discussion (Misc queries) | |||
Visual Basic code | Excel Discussion (Misc queries) | |||
I need a visual basic code....please | Excel Discussion (Misc queries) | |||
Visual Basic Code in Excel | Excel Programming |