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

Hi,

I am using a copy paste macro to take the contents of certain cells from a
database and transfer them to other worksheets. The code I am currently
using is

Range("C3:O200").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("CB190").Select
Range("D10").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

Is it possible I can change this code to also copy text and cell formats at
the same time? i.e. text colour, cell filled colour, text size, text colour
etc

Thanks
LiAD
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Copy format macro needed

You can either use

ActiveSheet.Paste
OR
Selection.PasteSpecial

If this post helps click Yes
---------------
Jacob Skaria


"LiAD" wrote:

Hi,

I am using a copy paste macro to take the contents of certain cells from a
database and transfer them to other worksheets. The code I am currently
using is

Range("C3:O200").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("CB190").Select
Range("D10").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

Is it possible I can change this code to also copy text and cell formats at
the same time? i.e. text colour, cell filled colour, text size, text colour
etc

Thanks
LiAD

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 386
Default Copy format macro needed

Great thanks.

One small point. Can I not get it to copy the border formats, just the text
and fill etc?

I have two different sheet formats in terms of borders etc which i need to
maintain.

Thanks a lot

"OssieMac" wrote:

Hi,

It appears that you have recorded the code so you can do what you require by
simply repeating the Paste Special a second time but paste Formats. There is
no need to copy again; just do the Paste Special twice; first time Values;
second time Formats.


--
Regards,

OssieMac


"LiAD" wrote:

Hi,

I am using a copy paste macro to take the contents of certain cells from a
database and transfer them to other worksheets. The code I am currently
using is

Range("C3:O200").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("CB190").Select
Range("D10").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

Is it possible I can change this code to also copy text and cell formats at
the same time? i.e. text colour, cell filled colour, text size, text colour
etc

Thanks
LiAD

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 386
Default Copy format macro needed

sorted.

thanks

"LiAD" wrote:

Great thanks.

One small point. Can I not get it to copy the border formats, just the text
and fill etc?

I have two different sheet formats in terms of borders etc which i need to
maintain.

Thanks a lot

"OssieMac" wrote:

Hi,

It appears that you have recorded the code so you can do what you require by
simply repeating the Paste Special a second time but paste Formats. There is
no need to copy again; just do the Paste Special twice; first time Values;
second time Formats.


--
Regards,

OssieMac


"LiAD" wrote:

Hi,

I am using a copy paste macro to take the contents of certain cells from a
database and transfer them to other worksheets. The code I am currently
using is

Range("C3:O200").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("CB190").Select
Range("D10").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

Is it possible I can change this code to also copy text and cell formats at
the same time? i.e. text colour, cell filled colour, text size, text colour
etc

Thanks
LiAD

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
Copy format macro needed OssieMac Excel Programming 0 April 22nd 09 11:37 AM
Macro needed to copy groups of data from one spreadsheet to anothe timdavis100 Excel Programming 1 November 11th 08 12:27 AM
Help needed... please (Copy Past Macro) mydogpeanut Excel Programming 0 October 19th 07 03:17 PM
macro needed to compare value and copy data underneath it to anoth Arain Excel Discussion (Misc queries) 1 April 17th 07 10:52 PM
Conditional Copy Macro Help Needed [email protected] Excel Programming 1 June 8th 06 09:58 PM


All times are GMT +1. The time now is 08:15 AM.

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"