Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel group box 1

Status
Not open for further replies.

tb913

IS-IT--Management
Jul 30, 2002
49
US
I am creating a form in excel and I want to be able to reference a cell that is contained in a group box, but I am not having any luck. I have a group box with a few radio buttons as options and then below that, within the group box, I want to be able to enter a number in a cell that is used to calculate a formula. When I try to create the formula, I can't select the cell I want to reference because the group box is "sitting over the cells" if that makes sense. I've seen this done before, so I know it can be done, I just don't know how. Any ideas? Thanks.
 
To reach a cell, use the following syntax along with the appropriate property of the cell:

Workbooks("Book1.xls").Worksheets("Sheet1").Range("B5")

To set the formula in the cell, use the Formula property like:

Workbooks("Book1.xls").Worksheets("Sheet1").Range("B5").Formula = "=SUM(B1:B4)"

Note that the Formula function is in String Data Type Format. Therefore, in this example, cell [Book1.xls]Sheet1!B5 will contain the following formula:

=SUM(B1:B4)

If you are wanting to set some sort of a value to the cell, use the Value property like:

Workbooks("Book1.xls").Worksheets("Sheet1").Range("B5").Value = 250

Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
When the going gets tough, the tough gets going.
 
I tried it again and it worked this time. I don't know what I was doing wrong. Thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top