#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Macro Debug Error

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

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,089
Default Macro Debug Error

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


"Soroya1920" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Debug Error in Code Karen McKenzie Excel Discussion (Misc queries) 2 May 18th 07 04:25 PM
Locking debug mode in a macro Megadrone Excel Worksheet Functions 1 November 30th 06 11:32 PM
How do I resolve debug error macro Excel 2000? At least, any lead Excel 2000 Macros debugger Excel Discussion (Misc queries) 5 October 25th 05 08:56 AM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM
help with debug Rusty New Users to Excel 3 February 2nd 05 04:16 AM


All times are GMT +1. The time now is 11:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"