PDA

View Full Version : Solved: Convert Excel code to be run from work - paste links



RECrerar
08-20-2009, 02:40 AM
Hi, hope the title's okay.

I am trying to paste a linked range in Excel but from word VBA.

The Excel code is simply

Range("A1").Select
ActiveSheet.Paste Link:=True

In Word I have

With Wb.ActiveSheet
.Range("A1").Select
.Paste Link:=True
'Other Stuff
End With


However if fails at the past command with the error "Paste Method of worksheet class failed"

Can anyone help with the right code I should be using. I really need these cells to be links.

Thanks
Robyn

RECrerar
08-20-2009, 02:45 AM
Hmm, Okay, ignore this post. I'm not too sure what was wrong before but the same code appears to be working now so that is all good.