What are the reasons for ""ActiveSheet.Paste Link:=True"" failure
On Jul 7, 6:30 pm, "Bob Phillips" wrote:
I have no idea what F_CELL is, but without it, this worked fine for me, from
a button
Selection.Range(Cells(1, 46), Cells(1, 47)).Copy
Selection.Offset(0, 4).Select
ActiveSheet.Paste Link:=True
--
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
"CAPTGNVR" wrote in message
ups.com...
On Jul 7, 5:08 pm, "Bob Phillips" wrote:
This works fine for me
Range("B4:C4").Copy
Range("E4:F4").Select
ActiveSheet.Paste link:=True
--
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my
addy)
"CAPTGNVR" wrote in message
groups.com...
DEAR ALL
What I need is for example to copy contents in say b4.c4 to e4.f4. On
copying I want e4.f4 as a link so that any changes in b4.c4 would
relfect automatically in e4.f4.
So I wrote in VBA and it works fine if I do step by step using F8.
But when run thro the command button the ActiveSheet.Paste Link:=True
fails. Mr. Tom adviced to set the focus to false and did not work.
Pls advice how to achieve this. I will check for response every
30mints. Pls help.
D/BOB
thnks. my code is asf:
Activecell.select
Selection.Range(Cells(1, 46), Cells(1, 47)).Select
Selection.Copy
F_CELL.Select
Selection.Offset(0, 4).Select
ActiveSheet.Paste Link:=True ' at this place i get the error that
paste method class failed
but when i select debug from the error and press F8 it does copy. Pls
explain. Or is anyother way to copy from one cell to another cell as
a link thro vba??. whole day i will be checking as the whole program
has come to a halt bcos of this failure to copy as a link --
activesheet.pastelink failure.
D/BOB
So eagerly i am waiting to solve this. F_CELL is the one I set it as
say A1. So what my vba does is to take this value and goto another
range and locate that. Once located it is set as F_CELL2.
So i used the F-Cell to go back to A1 and copy the two adjacent cells
and go to the new location set as F_CELL2 and paste the link. i am
using excel 97. Unable to figure out why it does not work when use
the command button but when i am testing it in the visual basic editor
by using F8 it works just fine. Some how dont give up Bob. Help me
|