Macro Debug Error

G

Guest

I have a "database" worksheet with 7 columns that input information on one
row at a time. I then have a second worksheet "request form" that I have my
macro button on that extracts the information into a form type format from
the last line of the "database" worksheet. I've been able to extract rows 1-4
but I get a debug error at the first 'ActiveSheet.Paste' when extracting info
from row 5. I've cleared the formatting and deleted that specific row. What
am I doing wrong?

Sheets("data base of requests").Select
Range("A1").Select
Selection.End(xlDown).Select
Selection.Copy
Sheets("request form").Select
Range("g10").Select
ActiveSheet.Paste
Sheets("data base of requests").Select
ActiveCell.Offset(-2, 1).Range("A1").Select
Selection.End(xlDown).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("request form").Select
Range("b12").Select
ActiveSheet.Paste
Sheets("data base of requests").Select
ActiveCell.Offset(-2, 1).Range("A1").Select
Selection.End(xlDown).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("request form").Select
Range("G12").Select
ActiveSheet.Paste
Sheets("data base of requests").Select
ActiveCell.Offset(-2, 1).Range("A1").Select
Selection.End(xlDown).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("request form").Select
Range("B8").Select
ActiveSheet.Paste
Sheets("data base of requests").Select
ActiveCell.Offset(-2, 1).Range("A1").Select
Selection.End(xlDown).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("request form").Select
Range("G8").Select
ActiveSheet.Paste
Sheets("data base of requests").Select
ActiveCell.Offset(-2, 1).Range("A1").Select
Selection.End(xlDown).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("request form").Select
Range("B10").Select
ActiveSheet.Paste
Sheets("data base of requests").Select
ActiveCell.Offset(-2, 1).Range("A1").Select
Selection.End(xlDown).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("request form").Select
Range("B14").Select
ActiveSheet.Paste
Sheets("data base of requests").Select
ActiveCell.Offset(-2, 1).Range("A1").Select
Selection.End(xlDown).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("request form").Select
Range("B16").Select
ActiveSheet.Paste
Sheets("data base of requests").Select
ActiveCell.Offset(-2, 1).Range("A1").Select
Selection.End(xlDown).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("request form").Select
Range("B17").Select
ActiveSheet.Paste
Sheets("data base of requests").Select
ActiveCell.Offset(-2, 1).Range("A1").Select
Selection.End(xlDown).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("request form").Select
Range("B18").Select
ActiveSheet.Paste
End Sub
 
T

Trevor Shuttleworth

I think it must depend on what data you have in what cells.

It works fine for me but I probably haven't got my test data set up like
yours

What error do you get ? Have you stepped it through and watched where it
fails and what the data looks like at that point ?

Does this make your head ache when it runs ? ;-)

Regards

Trevor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top