Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default What are the reasons for ""ActiveSheet.Paste Link:=True"" failure

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default What are the reasons for ""ActiveSheet.Paste Link:=True"" failure

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
oups.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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default What are the reasons for ""ActiveSheet.Paste Link:=True"" failure

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

oups.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.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default What are the reasons for ""ActiveSheet.Paste Link:=True"" failure

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

oups.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.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default 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 further info to make it more ustanding:

Activecell.select (this is the place where i found the match and set
it as F_CELL2)

Selection.Range(Cells(1, 46), Cells(1, 47)).Select (I WANT TO COPY
THIS RANGE)

Selection.Copy
F_CELL.Select (THIS IS THE FIRST PLACE WHERE I STARTED FROM AND EASY
TO REFERENCE FROM HERE OTHER WISE I HAVE TO STRUGGLE TOO MUCH TO TRACE
BACK USING THE OFFSET FROM THE F_CELL2.)

Selection.Offset(0, 4).Select ( WORKS FINE AND GETS SELECTED)

ActiveSheet.Paste Link:=True ( ERROR PROPS UP AT THIS PLACE SAYING
THAT PASTING METHOD CLASS FAILED--)


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default What are the reasons for ""ActiveSheet.Paste Link:=True"" failure

Can you post me the workbook?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"CAPTGNVR" wrote in message
oups.com...
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 further info to make it more ustanding:

Activecell.select (this is the place where i found the match and set
it as F_CELL2)

Selection.Range(Cells(1, 46), Cells(1, 47)).Select (I WANT TO COPY
THIS RANGE)

Selection.Copy
F_CELL.Select (THIS IS THE FIRST PLACE WHERE I STARTED FROM AND EASY
TO REFERENCE FROM HERE OTHER WISE I HAVE TO STRUGGLE TOO MUCH TO TRACE
BACK USING THE OFFSET FROM THE F_CELL2.)

Selection.Offset(0, 4).Select ( WORKS FINE AND GETS SELECTED)

ActiveSheet.Paste Link:=True ( ERROR PROPS UP AT THIS PLACE SAYING
THAT PASTING METHOD CLASS FAILED--)




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default What are the reasons for ""ActiveSheet.Paste Link:=True"" failure

On Jul 7, 7:38 pm, "Bob Phillips" wrote:
Can you post me the workbook?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"CAPTGNVR" wrote in message

oups.com...

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


roups.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 further info to make it more ustanding:


Activecell.select (this is the place where i found the match and set
it as F_CELL2)


Selection.Range(Cells(1, 46), Cells(1, 47)).Select (I WANT TO COPY
THIS RANGE)


Selection.Copy
F_CELL.Select (THIS IS THE FIRST PLACE WHERE I STARTED FROM AND EASY
TO REFERENCE FROM HERE OTHER WISE I HAVE TO STRUGGLE TOO MUCH TO TRACE
BACK USING THE OFFSET FROM THE F_CELL2.)


Selection.Offset(0, 4).Select ( WORKS FINE AND GETS SELECTED)


ActiveSheet.Paste Link:=True ( ERROR PROPS UP AT THIS PLACE SAYING
THAT PASTING METHOD CLASS FAILED--)


D/BOB
I dont know how to post the sheet in this group. So i hv sent you the
email.

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default What are the reasons for ""ActiveSheet.Paste Link:=True"" failure

Did you try my suggestion at your previous post (this appears to be the same
problem).
If you're using a commandbutton to call this code then make sure its
"takefocusonclick" property is set to False.

Tim



"CAPTGNVR" wrote in message
oups.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.



  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default What are the reasons for ""ActiveSheet.Paste Link:=True"" fail

suspect your "Mr Tom":

Mr. Tom adviced to set the focus to false and did not work.



from the OP's original post in this thead.
--
Regards,
Tom Ogivy


"Tim Williams" wrote:

Did you try my suggestion at your previous post (this appears to be the same
problem).
If you're using a commandbutton to call this code then make sure its
"takefocusonclick" property is set to False.

Tim



"CAPTGNVR" wrote in message
oups.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.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
problem with Linking workbooks via "copy" and "paste link" Arkitek Excel Discussion (Misc queries) 0 December 19th 06 10:03 PM
Setting values for "TRUE","FALSE" and "#REF!" Hurtige[_2_] Excel Programming 1 August 11th 06 12:31 PM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
IF(VLOOKUP("MYDATA", MYNAME, 4) = 0, "TRUE", "FALSE") Souris Excel Programming 2 August 17th 05 05:33 AM


All times are GMT +1. The time now is 09:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"