Example of cell format for VBA learning notes

Source: Internet
Author: User

1 SubFormat Payroll bar ()2 Dimi%3i = Cells (Rows.Count,1). End (Xlup). Row4  forj =1  toI5     IfJMod 2  Then6     'If J Mod 2 =1 then is equivalent to the previous sentence because 1 corresponds to the logical value of ture, 0 is equivalent to False7     'This sentence is an odd line operation8          withCells (J,1). Entirerow.range ("A1:G1"). Font9         'EntireRow selection to entire rowTen. Bold =True One. Size =8 A. ColorIndex = About -         End  with -     Else 'dual-Number lines to operate the          withCells (J,1). Entirerow.range ("A1:G1"). Interior -         'Why are even rows (not the first row) or A1:g1? Because relative region references (Range.range) -. ColorIndex = + -         End  with +     End If - NextJ + End Sub A  at SubClear Formatting () - Selection.clearformats - End Sub

Example of cell format for VBA learning notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.