Results 1 to 2 of 2

Thread: Ecx

  1. #1
    Join Date
    May 2011
    Posts
    19

    Unanswered: Ecx

    Dim CellRef As String


    Windows("interim2.xls").Activate

    CellRef = Sheets("Sheet1").Range("V3").Text

    windows("interim2.xls").Activate
    Range("BA1:BD1093").Select
    Application.CutCopyMode = False
    Selection.Copy

    Windows(CellRef).Activate
    Sheets("Sheet1").Select
    Range("BA1:BA1093").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False

    ever time i run this code , the error 9 appears, don't seem to understand whats the problem.

    any help would be life saving.

  2. #2
    Join Date
    Jan 2009
    Location
    Kerala, India
    Posts
    183
    The Paste Target Range: Range("BA1:BA1093").Select

    Doesn't match with the Source Range: BA1:BD1093

    You are trying to Copy Column Range BA...BD and pasting into Column BA... alone.

    It will work if you replace the code for the Target Range as : Range("BA1").Select or Range("BA1:BD1093").Select
    Last edited by apr pillai; 07-25-11 at 12:06.
    www.MsAccessTips.com (Learn MS-Access Tips & Tricks)
    Learn Advanced MS-Access Programming with sample VBA Code.

    All responses are based on Access 2003/2007

Posting Permissions

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