B
bactfarmer
I'm creating a macro to copy information entered into a form and
put it into a database. It works fine as long as the first row of
information is filled out in the database. If the no information has
been added to the database yet I get Run-Time Error 1004 Application
Defined or Object Defined Error. What can I change to correct this
from happening
Sheets("Form").Select
Range("A6:X20").Select
Selection.Copy
Sheets("Database").Select
Range("A10").Select
Selection.End(xlDown).Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Selection.End(xlDown).Select
put it into a database. It works fine as long as the first row of
information is filled out in the database. If the no information has
been added to the database yet I get Run-Time Error 1004 Application
Defined or Object Defined Error. What can I change to correct this
from happening
Sheets("Form").Select
Range("A6:X20").Select
Selection.Copy
Sheets("Database").Select
Range("A10").Select
Selection.End(xlDown).Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Selection.End(xlDown).Select