Consulting

Results 1 to 3 of 3

Thread: Help with VBA

  1. #1

    Help with VBA

    Hey guys I have this excel file I want to change one thing on and I cant figure it out. On the sheet called "Input" I want to be able to select a scale number in the upper right hand corner and have it copy over all of the information from the sheet called "Database." Right now when I select the scale number it only copies up until the "Bin/Lot ID" and leaves out the "Destination" and "Comments" columns.

    Please help!
    Attached Files Attached Files

  2. #2
    VBAX Regular
    Joined
    Feb 2013
    Posts
    52
    Location
    Your lCellsDE variable is equal to a cell count of the named range "OrderEntry" which is 14.
    You are then using that 14 as the last column to copy instead of the number of columns to copy.

    Try changing this line
                .Range(.Cells(lRecRow, lColHist), .Cells(lRecRow, lCellsDE)).Copy
    to
                .Cells(lRecRow, lColHist).Resize(, lCellsDE).Copy

  3. #3
    AMAZING!!! THANK YOU SO MUCH!! That was such a headache!!!

    Love this site!

Posting Permissions

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