View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
neonangel neonangel is offline
external usenet poster
 
Posts: 1
Default option buttons run Click code when value is changed via VBA code

Hello All,

I am using some OptionButton option buttons in Excel and wish to chang
their value (within VBA) without actually running the Click cod
associated with them.

When I use the following code to change the button value:

ActiveSheet.OLEObjects("opt1").Object.Value = True

The following code is automatically run:

Private Sub opt1_Click()
Call Display.ShowHideStocks(1, 2)
End Sub

However I only want the above code to run when the user actuall
selects the option button - not when I modify their values via code.

Any ideas?

Ale

--
Message posted from http://www.ExcelForum.com