Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Option Buttons that use macros

I have a workbook that I am trying to use 2 option buttons that use macros to
copy and paste data in one cell in a separate worksheet to 7 other cells in a
row in the same worksheet.

One option button is named CASH and the other is named CREDIT and I want the
macro to copy cell N10 in worksheet 'Markup Calculator' to cells F10:M10 when
the CASH option button is pushed in worksheet 'Print Me - Retail' and then
return to the 'Print Me - Retail' worksheet.

The same for the second options button named CREDIT. I want the same thing
to happen except I want cell N11 to be copied to cells F10:M10 and also
return to the 'Print Me - Retail' worksheet.

Any help would be appreciated. I have tried to recorded the macro sequence
but it seems to get stuck at Range("N10").Select when I try to copy the code
into the:

Sub MacroCash()
'
' MacroCash Macro
' CASH
'

'
Sheets("Markup Calculator").Select
Range("N10").Select
Selection.Copy
Range("F10").Select
ActiveSheet.Paste
Range("G10").Select
ActiveSheet.Paste
Range("H10").Select
ActiveSheet.Paste
Range("I10").Select
ActiveSheet.Paste
Range("J10").Select
ActiveSheet.Paste
Range("K10").Select
ActiveSheet.Paste
Range("L10").Select
ActiveSheet.Paste
Range("M10").Select
ActiveSheet.Paste
Range("F20:G20").Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Range("A1").Select
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 123
Default Option Buttons that use macros

You don't have to use copy and paste.
Try something like:

range("f10:m10").formula = range("n10").formula
sheets("Print Me - Retail").select
range("a1").select

I think that's what you were looking for.

On Mar 18, 11:48 pm, SteveS wrote:
I have a workbook that I am trying to use 2 option buttons that use macros to
copy and paste data in one cell in a separate worksheet to 7 other cells in a
row in the same worksheet.

One option button is named CASH and the other is named CREDIT and I want the
macro to copy cell N10 in worksheet 'Markup Calculator' to cells F10:M10 when
the CASH option button is pushed in worksheet 'Print Me - Retail' and then
return to the 'Print Me - Retail' worksheet.

The same for the second options button named CREDIT. I want the same thing
to happen except I want cell N11 to be copied to cells F10:M10 and also
return to the 'Print Me - Retail' worksheet.

Any help would be appreciated. I have tried to recorded the macro sequence
but it seems to get stuck at Range("N10").Select when I try to copy the code
into the:

Sub MacroCash()
'
' MacroCash Macro
' CASH
'

'
Sheets("Markup Calculator").Select
Range("N10").Select
Selection.Copy
Range("F10").Select
ActiveSheet.Paste
Range("G10").Select
ActiveSheet.Paste
Range("H10").Select
ActiveSheet.Paste
Range("I10").Select
ActiveSheet.Paste
Range("J10").Select
ActiveSheet.Paste
Range("K10").Select
ActiveSheet.Paste
Range("L10").Select
ActiveSheet.Paste
Range("M10").Select
ActiveSheet.Paste
Range("F20:G20").Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Range("A1").Select
End Sub


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 123
Default Option Buttons that use macros

You can avoid the whole copy/paste thing with something like:

sheets("Markup Calculator").range("f10:M10").formula = sheets"Print Me
- Retail").range("n10").formula

I don't quite understand what else you want to do

On Mar 18, 11:48 pm, SteveS wrote:
I have a workbook that I am trying to use 2 option buttons that use macros to
copy and paste data in one cell in a separate worksheet to 7 other cells in a
row in the same worksheet.

One option button is named CASH and the other is named CREDIT and I want the
macro to copy cell N10 in worksheet 'Markup Calculator' to cells F10:M10 when
the CASH option button is pushed in worksheet 'Print Me - Retail' and then
return to the 'Print Me - Retail' worksheet.

The same for the second options button named CREDIT. I want the same thing
to happen except I want cell N11 to be copied to cells F10:M10 and also
return to the 'Print Me - Retail' worksheet.

Any help would be appreciated. I have tried to recorded the macro sequence
but it seems to get stuck at Range("N10").Select when I try to copy the code
into the:

Sub MacroCash()
'
' MacroCash Macro
' CASH
'

'
Sheets("Markup Calculator").Select
Range("N10").Select
Selection.Copy
Range("F10").Select
ActiveSheet.Paste
Range("G10").Select
ActiveSheet.Paste
Range("H10").Select
ActiveSheet.Paste
Range("I10").Select
ActiveSheet.Paste
Range("J10").Select
ActiveSheet.Paste
Range("K10").Select
ActiveSheet.Paste
Range("L10").Select
ActiveSheet.Paste
Range("M10").Select
ActiveSheet.Paste
Range("F20:G20").Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Range("A1").Select
End Sub


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Option Buttons that use macros

YOU ROCK! I am a VB idiot and you just took something so simple and made our
business have a new tool that is of tremendous value!

Thanks so much!

"Reitanos" wrote:

You can avoid the whole copy/paste thing with something like:

sheets("Markup Calculator").range("f10:M10").formula = sheets"Print Me
- Retail").range("n10").formula

I don't quite understand what else you want to do

On Mar 18, 11:48 pm, SteveS wrote:
I have a workbook that I am trying to use 2 option buttons that use macros to
copy and paste data in one cell in a separate worksheet to 7 other cells in a
row in the same worksheet.

One option button is named CASH and the other is named CREDIT and I want the
macro to copy cell N10 in worksheet 'Markup Calculator' to cells F10:M10 when
the CASH option button is pushed in worksheet 'Print Me - Retail' and then
return to the 'Print Me - Retail' worksheet.

The same for the second options button named CREDIT. I want the same thing
to happen except I want cell N11 to be copied to cells F10:M10 and also
return to the 'Print Me - Retail' worksheet.

Any help would be appreciated. I have tried to recorded the macro sequence
but it seems to get stuck at Range("N10").Select when I try to copy the code
into the:

Sub MacroCash()
'
' MacroCash Macro
' CASH
'

'
Sheets("Markup Calculator").Select
Range("N10").Select
Selection.Copy
Range("F10").Select
ActiveSheet.Paste
Range("G10").Select
ActiveSheet.Paste
Range("H10").Select
ActiveSheet.Paste
Range("I10").Select
ActiveSheet.Paste
Range("J10").Select
ActiveSheet.Paste
Range("K10").Select
ActiveSheet.Paste
Range("L10").Select
ActiveSheet.Paste
Range("M10").Select
ActiveSheet.Paste
Range("F20:G20").Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Range("A1").Select
End Sub



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
Option Buttons Bo0ts Excel Discussion (Misc queries) 4 December 6th 07 03:11 AM
Option buttons on excel and macros shezzer_1972 Excel Discussion (Misc queries) 1 March 6th 07 04:24 PM
Option Buttons coryrey Excel Discussion (Misc queries) 1 January 6th 06 03:49 PM
Option Buttons Ashman Excel Discussion (Misc queries) 2 July 10th 05 08:24 PM
yes/no option buttons Evanya Excel Discussion (Misc queries) 4 May 28th 05 12:19 AM


All times are GMT +1. The time now is 06:30 PM.

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"