Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Diana
 
Posts: n/a
Default Macro to change data in a sheet

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
Casey
 
Posts: n/a
Default Macro to change data in a sheet


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("Data") '<=====Change name as needed
If OptionButton1.Value = True Then
wks.Range("A1") = 100
End If
End Sub

Private Sub OptionButton2_Click()
Dim wks As Worksheet
Set wks = Worksheets("Data") '<=====Change name as needed
If OptionButton2.Value = True Then
wks.Range("A1") = 50
End If
End Sub


--
Casey


------------------------------------------------------------------------
Casey's Profile: http://www.excelforum.com/member.php...fo&userid=4545
View this thread: http://www.excelforum.com/showthread...hreadid=537308

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Importing Data Jillian Excel Worksheet Functions 9 December 23rd 05 12:45 PM
Help PLEASE! Not sure what answer is: Match? Index? Other? baz Excel Worksheet Functions 7 September 3rd 05 03:47 PM
data from one sheet to several in sequential order! firecord New Users to Excel 6 June 22nd 05 05:10 PM
How to change macro so it performs actions on ACTIVE sheet? Tom9283 Excel Discussion (Misc queries) 6 April 15th 05 07:32 AM
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 05:55 PM


All times are GMT +1. The time now is 10:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"