Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

new to Macro programming

  Asked By: Anita    Date: Aug 23    Category: MS Office    Views: 760
  

I am trying to create a macro using a radio button that when clicked will:

1) Change the color of the row that contains the radio button.
2) Copy information from that row to another worksheet. Depending on
one of the values in that row, the copied information gets placed in a
particular cell on the other worksheet.


Example - radio button in row 8 is clicked (worksheet 'Home')

Value of cell A8 = 7
Values from B8,C8, and D8 get copied
On worksheet 'Summary' the values from B8,C8, and D8 get placed in row
7 (the value of cell A8)

I'm completely lost - can anyone help?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Tarrant Thompson     Answered On: Aug 23

I don't know how you can implement, that each row  contains
one radio  button. So I will assume that RowOfRadioButton
will be a number of row in which the radiobutton is selected.

Activesheet.Range("a" & RowOfRadioButton & ":d" & RowOfRadioButton).Copy
ToWhichRowCopy=Activesheet.Range("a" & RowOfRadioButton).Value
Sheets("othersheet").Activate
Activesheet.Range("a" & ToWhichRowCopy).PasteSpecial Paste:=xlPasteAll

 
Didn't find what you were looking for? Find more on new to Macro programming Or get search suggestion and latest updates.




Tagged: