Livin404
Well-known Member
- Joined
- Jan 7, 2019
- Messages
- 774
- Office Version
- 365
- 2019
- Platform
- Windows
I'm trying to adjust the height of row so a paragraph will fit, otherwise after I run my numerous macros I have to manuals drag the row to see the whole paragraph. I'm pretty sure I didn't miss anything. I'm not getting any errors. The sheet is "Deficiencies", but I don't think that should matter.
Any assistance would be great.
Any assistance would be great.
VBA Code:
Sub CAT_finishing()
Dim myRng As Range
Dim CAT1 As Range
Dim CAT2 As Range
Dim CAT3 As Range
Dim CAT4 As Range
Dim CAT5 As Range
Dim CAT6 As Range
Dim expDate As Range
Set myRng = ActiveSheet.Range("A1:I100")
Set CAT1 = myRng.Find(What:="*Pri A (CAT I)*", MatchCase:=True)
Set CAT2 = myRng.Find(What:="*Pri C (CAT II)*", MatchCase:=True)
Set CAT3 = myRng.Find(What:="*Pri D (CAT III)*", MatchCase:=True)
Set CAT4 = myRng.Find(What:="*Pri E (CAT IV)*", MatchCase:=True)
Set CAT5 = myRng.Find(What:="*Pri F (CAT V)*", MatchCase:=True)
Set CAT6 = myRng.Find(What:="*Pri R (CAT VI)*", MatchCase:=True)
Set expDate = myRng.Find(What:="*Adjust the expiration date*", MatchCase:=True)
If CAT1 Is Nothing Then Exit Sub
If CAT2 Is Nothing Then Exit Sub
If CAT3 Is Nothing Then Exit Sub
If CAT4 Is Nothing Then Exit Sub
If CAT5 Is Nothing Then Exit Sub
If CAT6 Is Nothing Then Exit Sub
If expDate Is Nothing Then Exit Sub
CAT1.EntireRow.RowHeight = 67.5
CAT2.RowHeight = 67
CAT3.RowHeight = 50
CAT4.RowHeight = 87
CAT5.RowHeight = 102.75
CAT6.RowHeight = 150
expDate.RowHeight = 50
End Sub