I have two sheets in my workbook. One is the main sheet with radio buttons
that I am assigning macros to and the other sheet is the data sheet. What I
would like to do is to whenever I check the radio button data in specific
cells on a second sheet changes without actually showing that sheet. Every
single time the radio button is selected data in a second sheet changes and
the sheet appears with the changed data. I want the data to change but the
sheet should remain hidden. Is there a way to do this.
Thanks
Diane,
I'm not an expert and your post was a little vague, but this might give
you a starting place.
Option Explicit
Private Sub OptionButton1_Click()
Dim wks As Worksheet
Set wks = Worksheets(quot;Dataquot;) 'lt;=====Change name as needed
If OptionButton1.Value = True Then
wks.Range(quot;A1quot;) = 100
End If
End Sub
Private Sub OptionButton2_Click()
Dim wks As Worksheet
Set wks = Worksheets(quot;Dataquot;) 'lt;=====Change name as needed
If OptionButton2.Value = True Then
wks.Range(quot;A1quot;) = 50
End If
End Sub--
Casey------------------------------------------------------------------------
Casey's Profile: www.excelforum.com/member.php...foamp;userid=4545
View this thread: www.excelforum.com/showthread...hreadid=537308
- Apr 21 Sat 2007 20:37
Macro to change data in a sheet
close
全站熱搜
留言列表
發表留言