[COLOR=Red]***** SOLVED *****[/COLOR]
I am trying to set up a number of buttons in Excel.
I have been recording Macro’s to help get the VB script.
However I now have code that works when run as a Macro but not when run as a command button.
** Any ideas ?**
Private Sub CommandButton1_Click()
Range(“C6:F6”).Select
Selection.Copy
Sheets(“Sheet2”).Select
[COLOR=Magenta]** Range(“C6”).Select **[/COLOR]
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets(“Sheet1”).Select
Application.CutCopyMode = False
Selection.ClearContents
Range(“C4”).Select
End Sub
**FAILS [COLOR=Magenta]on pink section[/COLOR]
**
Sub Macro4()
Range("C8:F8").Select
Selection.Copy
Sheets("Sheet2").Select
Range("C4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet1").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("C4").Select
End Sub
**WORKS
Its the exact same code…
Creating macros and then attaching code has worked for others…
**