Forum Discussion

Robert6909's avatar
Robert6909
Copper Contributor
Oct 10, 2020

macro doesn't work - invalid forward reference or reference to compiled type

Range("A9000").Select

Windows("Current FLC Data.xlsm").Activate

Sheets("English").Select

Cells.Select

Selection.Delete Shift:=xlUp Range("A1").Select

Windows("Current Data.xlsm").Activate

Sheets("English").Select

Cells.Select

 

The transfer of data works for the the first, but not to Windows("Current Data.xlsm").Activate

Sheets("English").Select

 

1 Reply

  • Robert6909 

    How about

        Workbooks("Current FLC Data.xlsm").Worksheets("English").Cells.Clear
        Workbooks("Current Data.xlsm").Worksheets("English").Cells.Clear

    This assumes that both workbooks are open.

Resources