Forum Discussion
Jalma_fresh_fish
Jun 18, 2021Copper Contributor
I've issue with it Run time error 1004
Sub fish() ' ' fish Macro ' ' ActiveCell.Offset(-7, -4).Range("A1:A10").Select Selection.Copy Sheets("Price list").Select ActiveCell.Offset(-4, -2).Range("A1").Select Selection.PasteSpecial Paste:=xl...
JMB17
Jun 19, 2021Bronze Contributor
I suspect the error is occurring here:
ActiveCell.Offset(-4, -2).Range("A1").Select
Depending on the location of the active cell, it may not be able to select the cell 4 rows up and 2 columns to the left (for example, if the active cell is B2, then that location is outside the bounds of the worksheet).
Can you elaborate on what you're trying to do and how your worksheets are laid out? It appears you are trying to copy the selected cells into a table?
ActiveCell.Offset(-4, -2).Range("A1").Select
Depending on the location of the active cell, it may not be able to select the cell 4 rows up and 2 columns to the left (for example, if the active cell is B2, then that location is outside the bounds of the worksheet).
Can you elaborate on what you're trying to do and how your worksheets are laid out? It appears you are trying to copy the selected cells into a table?