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

Hi there all

I have got thsi to work now:

Private Sub CommandButton1_Click()
Range("D18").Copy Destination:=Worksheets("Custome
Details").Range("C18")
Range("A1").ClearContents

End Sub

byut i only want it to copy the data not the format of the cell i wan
it to use the format that is already there, any ideas?

cheers

from C

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Copy data not format

Hi
try
Private Sub CommandButton1_Click()
Range("D18").Copy
Worksheets("Customer Details").Range("C18").PasteSpecial
Paste:=xlPasteValues
Range("A1").ClearContents
end sub

Frank

Hi there all

I have got thsi to work now:

Private Sub CommandButton1_Click()
Range("D18").Copy Destination:=Worksheets("Customer
Details").Range("C18")
Range("A1").ClearContents

End Sub

byut i only want it to copy the data not the format of the cell i

want
it to use the format that is already there, any ideas?

cheers

from CK


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default re Copy data not format

use
Range("D18").Copy
Worksheets("Customer Details").Range("C18") _
.PasteSpecial xlPasteValues

Kevin Beckham

-----Original Message-----
Hi there all

I have got thsi to work now:

Private Sub CommandButton1_Click()
Range("D18").Copy Destination:=Worksheets("Customer
Details").Range("C18")
Range("A1").ClearContents

End Sub

byut i only want it to copy the data not the format of

the cell i want
it to use the format that is already there, any ideas?

cheers

from CK


---
Message posted from http://www.ExcelForum.com/

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 194
Default Copy data not format

I do it like:
Range("D18").Copy
Range("C18").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
_
False, Transpose:=False

HTH
Ed

"cakonopka " wrote in message
...
Hi there all

I have got thsi to work now:

Private Sub CommandButton1_Click()
Range("D18").Copy Destination:=Worksheets("Customer
Details").Range("C18")
Range("A1").ClearContents

End Sub

byut i only want it to copy the data not the format of the cell i want
it to use the format that is already there, any ideas?

cheers

from CK


---
Message posted from http://www.ExcelForum.com/



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copy data not format

Hi there

Says there is a problem with the
Paste:=xlPasteValues

any ideas what?

says something mainly about the := bit

cheers

from C

--
Message posted from http://www.ExcelForum.com



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copy data not format

Hi there

I have got to this stage

Private Sub CommandButton1_Click()
Range("D18").Copy
Worksheets("Customer Details").Range("C18").Select
Selection.PasteSpecial , Paste:=xlValues, Operation:=xlNone,
SkipBlanks:=xlNone
Range("D18").ClearContents

End Sub

the only thing is it doesent work when i enter the different worksheet
bit as u can see above, after the copy bit, nay idea why?

cheers

from CK


---
Message posted from http://www.ExcelForum.com/

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Copy data not format

One way:

Worksheets("Customer Details").Range("C18").Value = _
Range("D18").Value

In article ,
cakonopka wrote:

Hi there all

I have got thsi to work now:

Private Sub CommandButton1_Click()
Range("D18").Copy Destination:=Worksheets("Customer
Details").Range("C18")
Range("A1").ClearContents

End Sub

byut i only want it to copy the data not the format of the cell i want
it to use the format that is already there, any ideas?

cheers

from CK


---
Message posted from http://www.ExcelForum.com/

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copy data not format

HI THERE ALL

HERE IS WHER I AM AT THE MONENT

Private Sub CommandButton1_Click()
Range("D16").Copy
Worksheets("Customer Details").Range("B18").Value = _
Range("D16").Value

I HAVE A SERIES OF THESE FOR THE CELLS SO WHEN I PRESS THE BUTTON AL
THE DATA GOES INTO THE TABLE

ALL I NEED IT TO DO NOW IS TO ADD A NEW ROW IN A T THE TOP AND MOVE TH
OTHER DATA DOWN SO THE NEXT DATA IS INSERTED INTO THE NEW ROW, AN
IDEAS ON THIS LAST PROBLEM THEN ILL BE SO KIND AS TO LEAVE U VER
CLEVER PEOPLE ALONE, LOL

CHEERS

FROM C

--
Message posted from http://www.ExcelForum.com

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Copy data not format

If you can, re-write to avoid using Select or ActiveCell
in your code
It will run faster and with fewer errors
(because you'll explicitly point to the cells being
operated upon).
For instance, in your code
Range("D18").Copy
will be that cell on the active sheet. If you change sheets
then the cell now points to the new active sheet
Worksheets("Customer Details").Range("C18").Select
fails because that sheet is not active
Either put
Worksheets("Customer Details").Activate
before it, or (MUCH, MUCH better)
Worksheets("Customer Details").Range("C18") _
.PasteSpecial , Paste:=xlValues, Operation:=xlNone, _
SkipBlanks:=xlNone

This line references the cell without activating the sheet

Kevin Beckham

-----Original Message-----
Hi there

I have got to this stage

Private Sub CommandButton1_Click()
Range("D18").Copy
Worksheets("Customer Details").Range("C18").Select
Selection.PasteSpecial , Paste:=xlValues,

Operation:=xlNone,
SkipBlanks:=xlNone
Range("D18").ClearContents

End Sub

the only thing is it doesent work when i enter the

different worksheet
bit as u can see above, after the copy bit, nay idea why?

cheers

from CK


---
Message posted from http://www.ExcelForum.com/

.

  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Copy data not format

Worksheets("Customer Details").Range
("B18").EntireRow.Insert
Worksheets("Customer Details").Range("B18").Value = _
Range("D16").Value

no need to copy the cell with the code above.

Kevin Beckham

-----Original Message-----
HI THERE ALL

HERE IS WHER I AM AT THE MONENT

Private Sub CommandButton1_Click()
Range("D16").Copy
Worksheets("Customer Details").Range("B18").Value = _
Range("D16").Value

I HAVE A SERIES OF THESE FOR THE CELLS SO WHEN I PRESS

THE BUTTON ALL
THE DATA GOES INTO THE TABLE

ALL I NEED IT TO DO NOW IS TO ADD A NEW ROW IN A T THE

TOP AND MOVE THE
OTHER DATA DOWN SO THE NEXT DATA IS INSERTED INTO THE NEW

ROW, ANY
IDEAS ON THIS LAST PROBLEM THEN ILL BE SO KIND AS TO

LEAVE U VERY
CLEVER PEOPLE ALONE, LOL

CHEERS

FROM CK


---
Message posted from http://www.ExcelForum.com/

.

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
Lock Cell Format - Allow copy and paste of data without format change Chris12InKC Excel Worksheet Functions 2 May 9th 23 07:42 PM
Visual to copy format one row down when data entered Jeremy Excel Discussion (Misc queries) 1 November 5th 09 04:20 PM
How do I copy data in single cell format to a merged cell format Paul Excel Discussion (Misc queries) 1 June 27th 05 11:00 AM
copy data & format to mutiple sheets rvik[_6_] Excel Programming 4 January 23rd 04 11:21 AM
How copy format, font, color and border without copy/paste? Michel[_3_] Excel Programming 1 November 5th 03 04:43 PM


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