+ Reply to Thread
Results 1 to 4 of 4

HELP: What is wrong with this macro??

  1. #1
    Registered User
    Join Date
    04-23-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    1

    HELP: What is wrong with this macro??

    Sub EnterDe()
    '
    ' EnterDe Macro
    '

    '
    Application.ScreenUpdating = False
    Sheets("Details").Select
    Rows("4:4").Select
    This is it says where the problem is Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
    Sheets("Detail Enter").Select
    Range("B3").Select
    Selection.Copy
    Sheets("Details").Select
    Range("A4").Select
    ActiveSheet.Paste
    Sheets("Detail Enter").Select
    Range("B16").Select
    Selection.Copy
    Sheets("Details").Select
    Range("N4").Select
    ActiveSheet.Paste
    Sheets("Detail Enter").Select
    Range("B4").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Details").Select
    Range("B4").Select
    ActiveSheet.Paste
    Sheets("Detail Enter").Select
    Range("B5").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Details").Select
    Range("C4").Select
    ActiveSheet.Paste
    Sheets("Detail Enter").Select
    Range("B6").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Details").Select
    Range("D4").Select
    ActiveSheet.Paste
    Sheets("Detail Enter").Select
    Range("B7").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Details").Select
    Range("E4").Select
    ActiveSheet.Paste
    Sheets("Detail Enter").Select
    Range("B8").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Details").Select
    Range("F4").Select
    ActiveSheet.Paste
    Sheets("Detail Enter").Select
    Range("B9").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Details").Select
    Range("G4").Select
    ActiveSheet.Paste
    Sheets("Detail Enter").Select
    Range("B10").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Details").Select
    Range("H4").Select
    ActiveSheet.Paste
    Sheets("Detail Enter").Select
    Range("B11").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Details").Select
    Range("I4").Select
    ActiveSheet.Paste
    Sheets("Detail Enter").Select
    Range("B12").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Details").Select
    Range("J4").Select
    ActiveSheet.Paste
    Sheets("Detail Enter").Select
    Range("B13").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Details").Select
    Range("K4").Select
    ActiveSheet.Paste
    Sheets("Detail Enter").Select
    Range("B14").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Details").Select
    Range("L4").Select
    ActiveSheet.Paste
    Sheets("Detail Enter").Select
    Range("B15").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Details").Select
    Range("M4").Select
    ActiveSheet.Paste
    Sheets("Sheet1").Visible = True
    Sheets("Sheet1").Select
    Range("J1:J14").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Sheet1").Visible = False
    Sheets("Detail Enter").Select
    Range("B3:B16").Select
    ActiveSheet.Paste
    Range("A3:B16").Select
    Range("B16").Activate
    Application.CutCopyMode = False
    Selection.Cut
    Range("A3:B16").Select
    ActiveSheet.Paste
    Sheets("Detail Enter").Select
    Range("A1").Select
    Sheets("Details").Select
    Application.ScreenUpdating = True
    End Sub

  2. #2
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: HELP: What is wrong with this macro??

    Welcome to the forum, but you'd better read the forum rules - especially the one regarding code tags.

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: HELP: What is wrong with this macro??

    Also look at the rule about titles before proceeding....

    And, you might want to give an explanation of what the intent of the macro is and what is the actual error/problem.. etc. I.e. give details. Nobody is going to try to guess what your problem is....
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: HELP: What is wrong with this macro??

    @NBVC
    The OP did indicate the error (4th line of code) but it's buried.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1