Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Mindy Fernandez   on Mar 16 In MS Office Category.

  
Question Answered By: Anuja Shah   on Mar 16

Great handle, by the way.

You can easily do this yourself, as follows:
1) On sheet  Price, define two named ranges, Retail_Prices = D5:D300, and
Cost_Prices = E5:E300

You do not have to work with named ranges, but I find it more elegant.

2) Record a macro, call it Button1Retail
Select sheet Product
Select cell D14

Stop macro recording

3) Your macro should look something like this in the VB Editor:
Sub Button1Retail()
' Macro recorded on today's date by dummyinDOS

Sheets("Product").select
Range("D14").select

End Sub

4) Now you can add in your own code for the copying bit. Try the following, and
see what works for you:
Sub Button1Retail()
'
' Button1Retail Macro
' Macro recorded 07/08/2006 by dummyinDOS
'

'
Application.Goto Reference:="Retail_Prices"
Selection.Copy
Sheets("Prod").Select
Range("D14").Select
ActiveSheet.Paste
End Sub
----------------------------
There are more elegant ways of doing this, but for your purposes, this will
work.

Now assign this macro to your first button, and it should work.

Copy the code for the second button, modify the range to be copied from, and
assign to the second button.

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on option button help i think Or get search suggestion and latest updates.


Tagged: