Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
understanding
I have recently ran macro record to get a quick code built to help me set up
for a copy feature I am trying to build. it works fine in the record but when I place it in a button I get an error on the range line. the code is: Private Sub CommandButton1_Click() If Range("a1").Value = "test" Then Sheets("information").Select Range("A3:A21").Select Selection.Copy Sheets("information sheet").Select Range("C1").Select Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _ xlNone, SkipBlanks:=False, Transpose:=True End If End Sub I get the error on the line Range("A3:A21").Select Can someone help me understand why I am getting the error? -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/201005/1 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Better Understanding | Excel Programming | |||
Understanding SUMPRODUCT | Excel Worksheet Functions | |||
Not understanding with/end with | Excel Programming | |||
Not understanding If Not..Then nothing | Excel Programming | |||
Understanding Templates | Excel Programming |