Option button problem

P

Paul

Hi, using XL 2000

I have userform with 3 option buttons.
They all share the groupname BizType.

The user can select 1 of 3 options.
Option1 = Sales
Option2 = Purch
Option3 = Return

How do I dynamically update cell; Worksheets
("EnqHead").Cells(newrow, "C") with the current selected
option button value?

Many thanks,

Paul
 
A

Anya

Assuming you've got a custom form with 3 option buttons
and would like a cell (I'm using cell "A1") in "EnqHead"
worksheet to reflect the value selected, you could do the
following:
in the VB-editor double click on the any of the 3 option
buttons and place the following code:

Private Sub optPurch_Click()
Worksheets("EnqHead").Range("A1").Value = "Purchase"
End Sub

Private Sub optReturn_Click()
Worksheets("EnqHead").Range("A1").Value = "Return"
End Sub

Private Sub optSales_Click()
Worksheets("EnqHead").Range("A1").Value = "Sales"
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top