PC Review


Reply
Thread Tools Rate Thread

copy paste in correct data

 
 
Peter
Guest
Posts: n/a
 
      5th Apr 2010
I'm trying to coping and paste the contents of cell, and I'm pasting
something, just not the correct data.

In the cell that I'm coping is the value 1 the value that gets pasted if
1/1/1900

Here is the code that I'ce got

Debug.Print rngFind.Offset(0, 2).Value // prints one in the Immediate
window which is correct
jnk = rngFind.Offset(0, 2).Value //jnk is = "1"
x.Offset(0, 8).Value = jnk // the celvalue is 1/1/1900
Debug.Print x.Offset(0, 8) // prints 12/31/1899 in the
Immediate window

Any ideas?




 
Reply With Quote
 
 
 
 
Project Mangler
Guest
Posts: n/a
 
      5th Apr 2010
Peter,

Looks like the cell is formatted as date type.
something like Range(yourrange).NumberFormat = general should give you 1 in
the cell.


"Peter" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm trying to coping and paste the contents of cell, and I'm pasting
> something, just not the correct data.
>
> In the cell that I'm coping is the value 1 the value that gets pasted if
> 1/1/1900
>
> Here is the code that I'ce got
>
> Debug.Print rngFind.Offset(0, 2).Value // prints one in the Immediate
> window which is correct
> jnk = rngFind.Offset(0, 2).Value //jnk is = "1"
> x.Offset(0, 8).Value = jnk // the celvalue is 1/1/1900
> Debug.Print x.Offset(0, 8) // prints 12/31/1899 in the
> Immediate window
>
> Any ideas?
>
>
>
>



 
Reply With Quote
 
Peter
Guest
Posts: n/a
 
      5th Apr 2010
Yes, in the sheet I'm copying from, those cells have that upper corner
green tag to them and the error is that this cell is formatted as text or
proceeded by an apostrophe. So I got that thanks


"Project Mangler" <(E-Mail Removed)> wrote in message
news:%23bu$(E-Mail Removed)...
> Peter,
>
> Looks like the cell is formatted as date type.
> something like Range(yourrange).NumberFormat = general should give you 1
> in
> the cell.
>
>
> "Peter" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> I'm trying to coping and paste the contents of cell, and I'm pasting
>> something, just not the correct data.
>>
>> In the cell that I'm coping is the value 1 the value that gets pasted if
>> 1/1/1900
>>
>> Here is the code that I'ce got
>>
>> Debug.Print rngFind.Offset(0, 2).Value // prints one in the Immediate
>> window which is correct
>> jnk = rngFind.Offset(0, 2).Value //jnk is = "1"
>> x.Offset(0, 8).Value = jnk // the celvalue is 1/1/1900
>> Debug.Print x.Offset(0, 8) // prints 12/31/1899 in the
>> Immediate window
>>
>> Any ideas?
>>
>>
>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do deselect data on paste and enable copy/paste again? das Microsoft Word New Users 1 30th Jun 2008 10:00 AM
I need to copy/paste cursor has 3 lines in front how do I correct. =?Utf-8?B?Y29jbw==?= Microsoft Word Document Management 2 23rd Feb 2007 03:45 PM
Excel cut/Paste Problem: Year changes after data is copy and paste =?Utf-8?B?QXNpZg==?= Microsoft Excel Misc 3 9th Dec 2005 05:16 PM
IN AN IF FORMULA COPY STRING OF DATA IF A CELL IS CORRECT =?Utf-8?B?TWlnaHQgYWxzbyBiZSBhbm90aGVyIHRyaWNreSBm Microsoft Excel Setup 1 12th Oct 2005 09:21 PM
Correct copy&paste components at design time Iulian Ionescu Microsoft Dot NET Framework Forms 0 11th Oct 2003 04:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:35 AM.