Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The file Formatting 2 . xlsm contains the following code for formatting some data. This code works perfectly well, but it is quite repetitive. Rewrite

The file Formatting 2.xlsm contains the following code for formatting some
data. This code works perfectly well, but it is quite repetitive. Rewrite it by using
as many With constructions as make sense, using apropriate indentation, and
then run your modified code to make sure it still works.
Sub Formatting0
ActiveWorkbook.Worksheets("Sheet1").Range("A1").Font.Bold=True
ActiveWorkbook.Worksheets("Sheet1").Renge("A1").Font.Size=14
ActiveWorkbook.Worksheets("Sheet1").Range("A1").HorizontalAlignment=xILeft
ActiveWorkbook.Worksheets("Sheet1").Range("A3:A6").Font.Bold=True
ActiveWorkbook.Worksheets("Sheet1").Range("A3:A6").Font.Italic=True
ActiveWorkbook.Worksheets("Sheet1").Range("A3:A6").Font.Color=vbGreen
ActiveWorkbook.Worksheets("Sheet1").Range("A3:A6").Insertindent1
ActiveWorkbook.Worksheets("Sheet1").Range("B2:D2").Font.Bold-True
ActiveWorkbook.Worksheets("Sheet1").Range("B2:D2").Font.Italic=True
ActiveWorkbook.Worksheets("Sheet1").Range("B2:D2").Font.Color=vbBlue
ActiveWorkbook.Worksheets("Sheet1").Range("B2:D2").HorizontalAlignment=xIRight
ActiveWorkbook.Worksheets("Sheet1").Range("B3:D6").Font.Color=vbRed
ActiveWorkbook.Worksheets("Sheet1").Range("B3:D6").NumberFormat="$#,##0"

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Implementation

Authors: Edward Sciore

2nd Edition

3030338355, 978-3030338350

More Books

Students also viewed these Databases questions

Question

Language in Context?

Answered: 1 week ago