Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ok here is my code it backs up a record to another sheet
Private Sub CommandButton2_Click() For Each c In Worksheets("ART Report").Range("P3:P10") If c.Value = "p" Then c.EntireRow.Copy Sheets("Paid Recievables").Select Set rng = Cells(Rows.Count, 1).End(xlUp) Rows(rng.Row + 1).Select Selection.Insert Shift:=x1Down End If Next End Sub and the the macro I first created that works: Sub Pselect() ' ' Macro1 Macro ' Macro recorded 3/12/2003 by me ' For Each c In Worksheets("ART Report").Range("P1:P10") If c.Value = "p" Then c.EntireRow.Copy Sheets("Paid Recievables").Select Set rng = Cells(Rows.Count, 1).End(xlUp) Rows(rng.Row + 1).Select Selection.Insert Shift:=x1Down End If Next End Sub also I am trying to use this bit of code to set of the range of the for statement "Set rng = Cells(Rows.Count, 1).End(xlUp)" but have not got it to work as of yet? any help is greatly appreciated |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA macro runs fine, but freezes if I try to do ANYTHING else whileit runs | Setting up and Configuration of Excel | |||
vba code runs...need spaces ........ | Excel Discussion (Misc queries) | |||
One macro runs then it auto runs another macro | Excel Discussion (Misc queries) | |||
Can you code a macro so it runs multiple times in the same workboo | Excel Discussion (Misc queries) | |||
Code runs every other time | Excel Programming |