Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default how ot keep value and drop formula while copying

Hi all,

I use " range.copy destination:= " to do copying between two worksheets in
two workbooks. I want to copy value instead of formula to my new sheet, how
can I do it?

Clara
--
thank you so much for your help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default how ot keep value and drop formula while copying

This will be a 2 liner code:

SourceRange.Copy
DestinationRange.PasteSpecial(xlPasteValues)

--

Sincerely,

Ronald R. Dodge, Jr.
Master MOUS 2000

"clara" wrote in message
...
Hi all,

I use " range.copy destination:= " to do copying between two worksheets
in
two workbooks. I want to copy value instead of formula to my new sheet,
how
can I do it?

Clara
--
thank you so much for your help



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default how ot keep value and drop formula while copying

Hi Ronald,

thank you very much! while copying value, I do not want to lose format(such
as background color, font size) How can I combine the xlPasteFormat with
xlPasteValue
?

Clara

thank you so much for your help


"Ronald Dodge" wrote:

This will be a 2 liner code:

SourceRange.Copy
DestinationRange.PasteSpecial(xlPasteValues)

--

Sincerely,

Ronald R. Dodge, Jr.
Master MOUS 2000

"clara" wrote in message
...
Hi all,

I use " range.copy destination:= " to do copying between two worksheets
in
two workbooks. I want to copy value instead of formula to my new sheet,
how
can I do it?

Clara
--
thank you so much for your help




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default how ot keep value and drop formula while copying

Change the xlPasteValues to xlPasteValuesAndNumberFormats

--

Sincerely,

Ronald R. Dodge, Jr.
Master MOUS 2000

"clara" wrote in message
...
Hi Ronald,

thank you very much! while copying value, I do not want to lose
format(such
as background color, font size) How can I combine the xlPasteFormat with
xlPasteValue
?

Clara

thank you so much for your help


"Ronald Dodge" wrote:

This will be a 2 liner code:

SourceRange.Copy
DestinationRange.PasteSpecial(xlPasteValues)

--

Sincerely,

Ronald R. Dodge, Jr.
Master MOUS 2000

"clara" wrote in message
...
Hi all,

I use " range.copy destination:= " to do copying between two
worksheets
in
two workbooks. I want to copy value instead of formula to my new sheet,
how
can I do it?

Clara
--
thank you so much for your help






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default how ot keep value and drop formula while copying

If dealing with other items besides numbers, you can also use the following:

DestinationRange.PasteSpecial(xlPasteValues)
DestinationRange.PasteSpecial(xlPasteFormats)

--

Sincerely,

Ronald R. Dodge, Jr.
Master MOUS 2000

"clara" wrote in message
...
Hi Ronald,

thank you very much! while copying value, I do not want to lose
format(such
as background color, font size) How can I combine the xlPasteFormat with
xlPasteValue
?

Clara

thank you so much for your help


"Ronald Dodge" wrote:

This will be a 2 liner code:

SourceRange.Copy
DestinationRange.PasteSpecial(xlPasteValues)

--

Sincerely,

Ronald R. Dodge, Jr.
Master MOUS 2000

"clara" wrote in message
...
Hi all,

I use " range.copy destination:= " to do copying between two
worksheets
in
two workbooks. I want to copy value instead of formula to my new sheet,
how
can I do it?

Clara
--
thank you so much for your help








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default how ot keep value and drop formula while copying

Hi Ronald Dodge,

Thank you very much! I have used your second method and it works very well.
As for your first method, where could you find the xlPasteValuesandFormat
argument?
There is still another question to be answered; there is icon image on the
left top of this sheet, and during copy process, it lost. How can I copy the
image to my new sheet?

Best Regards,

Clara
--
thank you so much for your help


"Ronald Dodge" wrote:

If dealing with other items besides numbers, you can also use the following:

DestinationRange.PasteSpecial(xlPasteValues)
DestinationRange.PasteSpecial(xlPasteFormats)

--

Sincerely,

Ronald R. Dodge, Jr.
Master MOUS 2000

"clara" wrote in message
...
Hi Ronald,

thank you very much! while copying value, I do not want to lose
format(such
as background color, font size) How can I combine the xlPasteFormat with
xlPasteValue
?

Clara

thank you so much for your help


"Ronald Dodge" wrote:

This will be a 2 liner code:

SourceRange.Copy
DestinationRange.PasteSpecial(xlPasteValues)

--

Sincerely,

Ronald R. Dodge, Jr.
Master MOUS 2000

"clara" wrote in message
...
Hi all,

I use " range.copy destination:= " to do copying between two
worksheets
in
two workbooks. I want to copy value instead of formula to my new sheet,
how
can I do it?

Clara
--
thank you so much for your help






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default how ot keep value and drop formula while copying

Sorry for the delayed response as yesterday, we had technical issues outside
of any one's controls, that prevented me from working. I had to get caught
up today to make up for that lost time. Not going to have much done when
you have a downed power line catching the grass on fire and then having
transformers blown out by power surges after the power has been rerouted.

You should be able to locate this in your help files, but then that would
only be if you have VBA Help installed on the system, which under the
default installation options, this is not included.

If VBA Help isn't installed, go through the installation process, and it is
under "Office Shared FeaturesVisual Basic for ApplicationsVisual Basic
Help"

Once you have that, you can then either lookup "PasteSpecial" in the index,
or you can drive down the content categories under "Content" with "Microsoft
Excel HelpProgramming InformationMicrosoft Excel Object
ModelMethodsPPasteSpecial Method" For the method that I was giving you,
it's assumed to be in the same application, so it's using the Range object,
not the Worksheet object. Where you see the "Paste" argument, click on the
"XlPasteType" bold text for it to list a set of constants you can use for
that particular argument. The default is xlPasteAll.

Now for your second question, it would be via the worksheet object, not the
range object, which case is a bit trickier. Generally, I don't like using
either the Select or Activate methods, but this might be one of those
exceptions to the general rule so as to be able to paste it in a proper
place. That is cause you have to use the worksheet object, not the range
object to apply the PasteSpecial method.
--

Sincerely,

Ronald R. Dodge, Jr.
Master MOUS 2000

"clara" wrote in message
...
Hi Ronald Dodge,

Thank you very much! I have used your second method and it works very
well.
As for your first method, where could you find the xlPasteValuesandFormat
argument?
There is still another question to be answered; there is icon image on the
left top of this sheet, and during copy process, it lost. How can I copy
the
image to my new sheet?

Best Regards,

Clara
--
thank you so much for your help


"Ronald Dodge" wrote:

If dealing with other items besides numbers, you can also use the
following:

DestinationRange.PasteSpecial(xlPasteValues)
DestinationRange.PasteSpecial(xlPasteFormats)

--

Sincerely,

Ronald R. Dodge, Jr.
Master MOUS 2000

"clara" wrote in message
...
Hi Ronald,

thank you very much! while copying value, I do not want to lose
format(such
as background color, font size) How can I combine the xlPasteFormat
with
xlPasteValue
?

Clara

thank you so much for your help


"Ronald Dodge" wrote:

This will be a 2 liner code:

SourceRange.Copy
DestinationRange.PasteSpecial(xlPasteValues)

--

Sincerely,

Ronald R. Dodge, Jr.
Master MOUS 2000

"clara" wrote in message
...
Hi all,

I use " range.copy destination:= " to do copying between two
worksheets
in
two workbooks. I want to copy value instead of formula to my new
sheet,
how
can I do it?

Clara
--
thank you so much for your help








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
Copying a Drop Down Menu Browniris Excel Discussion (Misc queries) 2 November 25th 09 11:13 PM
Copying drop down boxes ryerye Excel Discussion (Misc queries) 1 July 13th 07 04:49 AM
copying the Hyperlink function result without copying the actual formula mcheng Excel Worksheet Functions 2 June 9th 07 02:43 AM
Copying Drop Down Lists David Excel Programming 3 November 21st 05 01:26 AM
Help with copying a drop down box [email protected] Excel Programming 2 September 21st 05 01:23 AM


All times are GMT +1. The time now is 09:54 AM.

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"