Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I hope I can explain this well. What I'm wanting to do is put a button from
the Control Toolbox into multiple fields on a spreadsheet. If I click the button, then I want it to highlight the four fields next to it. Also, if possible I would like to have it then copy that selection to a different worksheet within the workbook. I hope I explained it well enough. If not, please post a reply and I will try to explain it better. Thanks in advance. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You may be better off using a button from the Forms Toolbar.
That way you can assign the same macro to all those buttons. This may give you a few ideas to play with: Option Explicit Sub testme01() Dim myBTN As Button Dim DestCell As Range Dim RngToCopy As Range Set myBTN = ActiveSheet.Buttons(Application.Caller) 'what does next to mean? Set RngToCopy = myBTN.TopLeftCell.Offset(0, 5).Resize(1, 4) If RngToCopy.Cells.Count = Application.CountA(RngToCopy) Then With ActiveSheet.Parent.Worksheets("sheet2") Set DestCell = .Cells(.Rows.Count, "A").End(xlUp) End With RngToCopy.Copy _ Destination:=DestCell RngToCopy.Select Else Beep MsgBox "Please fill in those 4 cells" End If End Sub PBS wrote: I hope I can explain this well. What I'm wanting to do is put a button from the Control Toolbox into multiple fields on a spreadsheet. If I click the button, then I want it to highlight the four fields next to it. Also, if possible I would like to have it then copy that selection to a different worksheet within the workbook. I hope I explained it well enough. If not, please post a reply and I will try to explain it better. Thanks in advance. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
HOW DO I GIVE A CONTROL TOOLBOX CHECKBOX A VALUE IN EXCEL? | Excel Worksheet Functions | |||
Vanishing Control Toolbox Command Buttons | Excel Discussion (Misc queries) | |||
Forms Toolbar vs. Control Toolbox vs. Data Validation for drop dow | Excel Discussion (Misc queries) | |||
Embed command button from the control toolbox doesnt work | Excel Worksheet Functions | |||
Embed command button from the control toolbox doesnt work | Excel Worksheet Functions |