Jumat, 13 April 2012

Re: [ExcelVBA] Formatting with Macro

 

VBA can do it just like in a worksheet. If you are using code to
copy the data, something like:

"

Selection.PasteSpecial Paste:=xlPasteValues, _ Operation:=xlNone, _ SkipBlanks:=False, _ Transpose:=False

"

That's just off the top of my hea, but if you look it up you can see
all of the parameters to PasteSpecial.

Hope that help some.

G.

From:sspatriots <sspatriots@yahoo.com>
To:ExcelVBA@yahoogroups.com
Sent:Friday, April 13, 2012 6:16 AM
Subject:[ExcelVBA] Formatting with Macro

Hi,

I have several worksheets in a workbook that currently have conditional
formatting to shade adjacent cells in the range F2:J20001 if there value
is less than a number in the adjacent cells in column B. For example,
if cell H33 has the number 9.898 in it and B33 has the number 10, then I
want H33 shaded.

I would use conditional formatting for this, however, I have a
subsequent macro that copies these worksheets to another workbook and I
don't want all the conditional formatting to go with it. I just want to
copy the values and the formats to the new workbook. While I realize
there is code out there that shells out to MS Word using HTML and then
back to Excel, it is really slow. If I copy the conditional formatting
to the new workbook, the file size is huge. Any help would be greatly
appreciated.

Thanks,

Steve

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
.

__,_._,___

Tidak ada komentar:

Posting Komentar