G
GeorgeMar
I am trying to copy a column and make a copy of the column next to it using
InsertCopiedCells
This macro in Excel works:
Columns("P").Select
Selection.Copy
Columns("Q:Q").Select
Selection.Insert Shift:=xlToRight
In Access I have
with wks2 'Worksheet 2
.columns(strColCopy).Select 'strColCopy=P
.columns.copy 'I had .Selection.Copy it didn't
work
.columns(strColPaste).Select 'strColPaste=Q:Q
.columns.Insert Shift:=-4161 'xlToRight=-4161 (I hope)
end with
The Access procedure gives error 1004: cannot copy and paste .....
any ideas
much appreciated
George
InsertCopiedCells
This macro in Excel works:
Columns("P").Select
Selection.Copy
Columns("Q:Q").Select
Selection.Insert Shift:=xlToRight
In Access I have
with wks2 'Worksheet 2
.columns(strColCopy).Select 'strColCopy=P
.columns.copy 'I had .Selection.Copy it didn't
work
.columns(strColPaste).Select 'strColPaste=Q:Q
.columns.Insert Shift:=-4161 'xlToRight=-4161 (I hope)
end with
The Access procedure gives error 1004: cannot copy and paste .....
any ideas
much appreciated
George