Answered step by step
Verified Expert Solution
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 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 Formatting
ActiveWorkbook.WorksheetsSheetRangeAFont.BoldTrue
ActiveWorkbook.WorksheetsSheetRengeAFont.Size
ActiveWorkbook.WorksheetsSheetRangeAHorizontalAlignmentxILeft
ActiveWorkbook.WorksheetsSheetRangeA:AFont.BoldTrue
ActiveWorkbook.WorksheetsSheetRangeA:AFont.ItalicTrue
ActiveWorkbook.WorksheetsSheetRangeA:AFont.ColorvbGreen
ActiveWorkbook.WorksheetsSheetRangeA:AInsertindent
ActiveWorkbook.WorksheetsSheetRangeB:DFont.BoldTrue
ActiveWorkbook.WorksheetsSheetRangeB:DFont.ItalicTrue
ActiveWorkbook.WorksheetsSheetRangeB:DFont.ColorvbBlue
ActiveWorkbook.WorksheetsSheetRangeB:DHorizontalAlignmentxIRight
ActiveWorkbook.WorksheetsSheetRangeB:DFont.ColorvbRed
ActiveWorkbook.WorksheetsSheetRangeB:DNumberFormat$###
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started