Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default PasteSpecial

Sometimes it works and sometimes it doesn't

ActiveWorkbook.FollowHyperlink Address: .................
ActiveSheet.PasteSpecial Format:="Text",Link:=False DisplayAsIcon:=
False

GET: Rin-time error 1004
PasteSpecial method of Worksheet class failed

Thanks,
GJ

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default PasteSpecial

Is there something in the clipboard that can be pasted per the instruction

--
Regards,
Tom Ogilvy


"gj" wrote:

Sometimes it works and sometimes it doesn't

ActiveWorkbook.FollowHyperlink Address: .................
ActiveSheet.PasteSpecial Format:="Text",Link:=False DisplayAsIcon:=
False

GET: Rin-time error 1004
PasteSpecial method of Worksheet class failed

Thanks,
GJ


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default PasteSpecial

Tom Ogilvy wrote:
Is there something in the clipboard that can be pasted per the instruction

--
Regards,
Tom Ogilvy


"gj" wrote:

Sometimes it works and sometimes it doesn't

ActiveWorkbook.FollowHyperlink Address: .................
ActiveSheet.PasteSpecial Format:="Text",Link:=False DisplayAsIcon:=
False

GET: Rin-time error 1004
PasteSpecial method of Worksheet class failed

Thanks,
GJ


Thanks Tom. Here is what is to be copied from the clipboard. It is in
the clipboard

MONTHLY SPONSORING REPORT FOR NVP# 15139004 - Lynn Puana
FOR THE PERIOD OF 07-01-06 TO 07-21-06
AMOUNTS DISPLAYED IN US DOLLARS

NVP....... RVP....... AM........ DM........ SPONSOR FULL NAME... #CONS
NEW CONSULTANT DATA........... BDAY.... ST.DATE. MTD RV......

15139004 15139004 15139004 15139004 15139004 1
16250279 06-12-76 07-03-06 1468.00
Puana Puana Puana Puana Lynn Puana
Anne Ristau

4 Fruit

Hopkinton, MA 01748

508-625-1418 (H)

617-610-3081 (B)


15139004 15139004 15139004 15139004 15139004 1
16264134 03-25-45 07-07-06 261.00
Puana Puana Puana Puana Lynn Puana
Janet Welch

23950 FM 485

Burlington, TX 76519

254-869-0018 (H)


15139004 15139004 15139004 15139004 15139004 1
16272970 04-01-72 07-11-06 251.00
Puana Puana Puana Puana Lynn Puana
Ann Collette Youngblood

3824 Nansemond Cir

Norfolk, VA 23513


Program:
1) Copies activesheet.pastespecial format:= "text"
(Eliminates there logo)
2) Deletes rows 1 to 15
(above example rows 1 -9)
3) Run next Sub Mailing_List()

4) Checks for 2nd name is Puana
If Puana, Prints Name & address
Else
skip to next row and try again till end of file

All works except PasteSpecial. PasteSpecial does work now and then.
Thinking of putting in an If condition
(if Special errors, loop and try again)

Many many thanks, Tom

Gordon

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default PasteSpecial

generally code that works intermittenly isn't problematic because of the code
per se. It is usually because the code depends on a certain environment -
and the environment changes. You could be trying to past into merged cells
or the clipboard could have gotten clear or pasting isn't an option at that
point.

You could probably check the state of the past special command button in
Edit=Pastespecial (with your code). If it is disabled, then you won't be
able to paste. You could halt and try to figure out why.

--
Regards,
Tom Ogilvy


"gj" wrote:

Tom Ogilvy wrote:
Is there something in the clipboard that can be pasted per the instruction

--
Regards,
Tom Ogilvy


"gj" wrote:

Sometimes it works and sometimes it doesn't

ActiveWorkbook.FollowHyperlink Address: .................
ActiveSheet.PasteSpecial Format:="Text",Link:=False DisplayAsIcon:=
False

GET: Rin-time error 1004
PasteSpecial method of Worksheet class failed

Thanks,
GJ


Thanks Tom. Here is what is to be copied from the clipboard. It is in
the clipboard

MONTHLY SPONSORING REPORT FOR NVP# 15139004 - Lynn Puana
FOR THE PERIOD OF 07-01-06 TO 07-21-06
AMOUNTS DISPLAYED IN US DOLLARS

NVP....... RVP....... AM........ DM........ SPONSOR FULL NAME... #CONS
NEW CONSULTANT DATA........... BDAY.... ST.DATE. MTD RV......

15139004 15139004 15139004 15139004 15139004 1
16250279 06-12-76 07-03-06 1468.00
Puana Puana Puana Puana Lynn Puana
Anne Ristau

4 Fruit

Hopkinton, MA 01748

508-625-1418 (H)

617-610-3081 (B)


15139004 15139004 15139004 15139004 15139004 1
16264134 03-25-45 07-07-06 261.00
Puana Puana Puana Puana Lynn Puana
Janet Welch

23950 FM 485

Burlington, TX 76519

254-869-0018 (H)


15139004 15139004 15139004 15139004 15139004 1
16272970 04-01-72 07-11-06 251.00
Puana Puana Puana Puana Lynn Puana
Ann Collette Youngblood

3824 Nansemond Cir

Norfolk, VA 23513


Program:
1) Copies activesheet.pastespecial format:= "text"
(Eliminates there logo)
2) Deletes rows 1 to 15
(above example rows 1 -9)
3) Run next Sub Mailing_List()

4) Checks for 2nd name is Puana
If Puana, Prints Name & address
Else
skip to next row and try again till end of file

All works except PasteSpecial. PasteSpecial does work now and then.
Thinking of putting in an If condition
(if Special errors, loop and try again)

Many many thanks, Tom

Gordon


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
Help with PasteSpecial [email protected] Excel Programming 2 June 9th 06 11:35 AM
PasteSpecial John Austin[_6_] Excel Programming 1 December 14th 05 03:32 PM
PasteSpecial Kevin Excel Programming 3 October 7th 04 01:07 PM
pastespecial Claude Excel Programming 2 February 24th 04 01:21 PM
pastespecial billQ Excel Programming 2 July 29th 03 11:39 PM


All times are GMT +1. The time now is 04:41 PM.

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

About Us

"It's about Microsoft Excel"