Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Paste Method - Link: "" 0

I changed a PasteSpecial operation to Paste (with Link:=True) to accomplish
pasting a link. I know about fiddling with the object cited to get it to
work, and it does - sort of.

My question is why, in the results of the Paste link, does a space ("") in
the source cell become a zero (0) in the destination when the the
PasteSpecial faithfully copies the space ? Is there additional syntax in the
<iActivesheet.Paste Link:=True</i stetement that will cause the correct
copying of spaces ?

Thanks in advance.

-dj
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Paste Method - Link: "" 0

You have to use xlPasteValuesAndNumberFormats to carry the format over to the
new location also. Otherwise the Excel default takes precedence and treats
"" as zero for a value.

"DonJ_Austin" wrote:

I changed a PasteSpecial operation to Paste (with Link:=True) to accomplish
pasting a link. I know about fiddling with the object cited to get it to
work, and it does - sort of.

My question is why, in the results of the Paste link, does a space ("") in
the source cell become a zero (0) in the destination when the the
PasteSpecial faithfully copies the space ? Is there additional syntax in the
<iActivesheet.Paste Link:=True</i stetement that will cause the correct
copying of spaces ?

Thanks in advance.

-dj

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Paste Method - Link: "" 0

Thanks, Whiz

I'm not finding any guidance on such an option in Paste method. I have used
Paste:=xlPasteValues in a PasteSpecial, but the following guessed-at syntax
is not accepted.

ActiveSheet.Paste Link:=True Paste:=xlPasteValuesAndNumberFormats

Could you be more specific ?

BTW, developing in XL11 but deploying for use in XL11 and xl12. Special
issues ?

-dj

"JLGWhiz" wrote:

You have to use xlPasteValuesAndNumberFormats to carry the format over to the
new location also. Otherwise the Excel default takes precedence and treats
"" as zero for a value.

"DonJ_Austin" wrote:

I changed a PasteSpecial operation to Paste (with Link:=True) to accomplish
pasting a link. I know about fiddling with the object cited to get it to
work, and it does - sort of.

My question is why, in the results of the Paste link, does a space ("") in
the source cell become a zero (0) in the destination when the the
PasteSpecial faithfully copies the space ? Is there additional syntax in the
<iActivesheet.Paste Link:=True</i stetement that will cause the correct
copying of spaces ?

Thanks in advance.

-dj

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Paste Method - Link: "" 0

Should have said that using the Link argument will carry over exactly what
you have in the cell but Excel will use the default number format to display
the value. The way to get the number format to remain intact is to not use
the Link argument, but do use the Paste:=xlPasteValuesAndNumberFormat
argument. Or use the Link argument and then include a line of code that
formats the cell to not show the zero.
You are up against a built in Excel anomaly which you have to outsmart.

"DonJ_Austin" wrote:

Thanks, Whiz

I'm not finding any guidance on such an option in Paste method. I have used
Paste:=xlPasteValues in a PasteSpecial, but the following guessed-at syntax
is not accepted.

ActiveSheet.Paste Link:=True Paste:=xlPasteValuesAndNumberFormats

Could you be more specific ?

BTW, developing in XL11 but deploying for use in XL11 and xl12. Special
issues ?

-dj

"JLGWhiz" wrote:

You have to use xlPasteValuesAndNumberFormats to carry the format over to the
new location also. Otherwise the Excel default takes precedence and treats
"" as zero for a value.

"DonJ_Austin" wrote:

I changed a PasteSpecial operation to Paste (with Link:=True) to accomplish
pasting a link. I know about fiddling with the object cited to get it to
work, and it does - sort of.

My question is why, in the results of the Paste link, does a space ("") in
the source cell become a zero (0) in the destination when the the
PasteSpecial faithfully copies the space ? Is there additional syntax in the
<iActivesheet.Paste Link:=True</i stetement that will cause the correct
copying of spaces ?

Thanks in advance.

-dj

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Paste Method - Link: "" 0

"JLGWhiz" wrote:

snip
You are up against a built in Excel anomaly which you have to outsmart.


Not the first time. :-)

Thanks.

-dj

"DonJ_Austin" wrote:

Thanks, Whiz

I'm not finding any guidance on such an option in Paste method. I have used
Paste:=xlPasteValues in a PasteSpecial, but the following guessed-at syntax
is not accepted.

ActiveSheet.Paste Link:=True Paste:=xlPasteValuesAndNumberFormats

Could you be more specific ?

BTW, developing in XL11 but deploying for use in XL11 and xl12. Special
issues ?

-dj

"JLGWhiz" wrote:

You have to use xlPasteValuesAndNumberFormats to carry the format over to the
new location also. Otherwise the Excel default takes precedence and treats
"" as zero for a value.

"DonJ_Austin" wrote:

I changed a PasteSpecial operation to Paste (with Link:=True) to accomplish
pasting a link. I know about fiddling with the object cited to get it to
work, and it does - sort of.

My question is why, in the results of the Paste link, does a space ("") in
the source cell become a zero (0) in the destination when the the
PasteSpecial faithfully copies the space ? Is there additional syntax in the
<iActivesheet.Paste Link:=True</i stetement that will cause the correct
copying of spaces ?

Thanks in advance.

-dj

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
How do I "paste link", and "transpose" at the same time? Zhi Sheng Excel Discussion (Misc queries) 3 August 5th 08 02:40 AM
What are the reasons for ""ActiveSheet.Paste Link:=True"" failure CAPTGNVR Excel Programming 9 July 7th 07 09:56 PM
problem with Linking workbooks via "copy" and "paste link" Arkitek Excel Discussion (Misc queries) 0 December 19th 06 10:03 PM
Error in Macro: "Method 'Paste' of object '_Worksheet' failed" blork Excel Programming 7 March 5th 06 05:48 PM
What is Error "Method "Paste" of object "_Worksheet" failed? vat Excel Programming 7 February 17th 06 08:05 PM


All times are GMT +1. The time now is 04:20 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"