View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Corey[_3_] Corey[_3_] is offline
external usenet poster
 
Posts: 25
Default Transfer cell values to another cell by selecting button.

Try using something like:
Sub MoveData()
If Range("G6").value <"" then Range("A1").value = Range("G6").value
' Modify the A1 to the required cell.
End Sub


I prefer a Forms Button from the Forms Toolbar.

1). Copy the code between the Sub and End Sub
2). Ad the Forms Button to the sheet where you want it
3). You will be prompted to attach a macro
4). Select New
5). Paste the copied code to the New macro
ALT+Q to exit VBA.

Corey....

"Gryndar" wrote in message
...
I would like to be able to select a 'Button' within a cell or beside a cell
to send the contents of that cell to another cell. The Control Toolbox has
a
Command Button but I do not know how to set it up. *The Cell in question
has
a formula to retrieved info from another sheet.* I have tried to set up a
Macro for a small triangle put into the cell but I am new to Macros and
can't
seem to get it to work properly.

Cell contains: =Players!C2

Macro I used was:

Sub MoveData()
Range("E6").Copy Range("F6")
End Sub

(E6 has formula: =Players!C2 )

I want to be able to click on that cell or a button or object in or beside
the cell that will then transfer that cell value to another cell on same
sheet.