Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
PLease help!
This has been racking my brains for days! I am trying to select a cell from which to start a selection copy. however i keep getting the runtime error on the Range line where, o where am i going wrong?!?!?!? Private Sub CommandButton1_Click() OrderNumber = InputBox("Enter CPL#") If OrderNumber = "" Then End If Receiptfile = "CPL #" & OrderNumber & ".xls" Workbooks.Open Filename:="C:\Documents and Settings\a\My Documents\" & Receiptfile ActiveSheet.Name = Receiptfile Workbooks.Open Filename:= _ "C:\Documents and Settings\a\My Documents\Entry Build.xls" Windows("Entry Build.xls").Activate Sheets("Entry Build").Select Sheets("Entry Build").Copy After:=Workbooks(Receiptfile).Sheets(1) Sheets(Receiptfile).Activate Range("A12").Activate THIS IS THE CULPRIT LINE OF CODE!!! Range(Selection, Selection.End(xlToRight)).Select Range("A12:I350").Select Application.CutCopyMode = False Selection.Copy Sheets("Entry Build").Select ActiveWindow.SmallScroll Down:=-3 Range("A5").Select ActiveSheet.Paste |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Runtime error 1004 | Excel Programming | |||
Uh oh...Runtime error 1004!!!! | Excel Programming | |||
runtime error 1004 | Excel Discussion (Misc queries) | |||
Excel 2003 Macro Error - Runtime error 1004 | Excel Discussion (Misc queries) | |||
What is RunTime Error '1004'? | Excel Programming |