Before my macro was setting all rows to black before it enters the loop. But now the requirement is to Set back the color to black in the certain range. New code is not working. Can anyone help me where I am doing wrong.
Before code:
Dim cells As Integer
Sheet1.cells.Font.Color = vbBlack
New Requirement:
Firstrow = Application.InputBox("Enter First number ", Type:=1)
Lastrow = Application.InputBox("Enter second number ", Type:=1)
'they enter integers of row numbers
Sheet1.cells(Firstrow, Lastrow).Font.Color = vbBlack
OR
ActiveSheet.cells(Firstrow, Lastrow).Font.Color = vbBlack
Thanks,
Pinky
Before code:
Dim cells As Integer
Sheet1.cells.Font.Color = vbBlack
New Requirement:
Firstrow = Application.InputBox("Enter First number ", Type:=1)
Lastrow = Application.InputBox("Enter second number ", Type:=1)
'they enter integers of row numbers
Sheet1.cells(Firstrow, Lastrow).Font.Color = vbBlack
OR
ActiveSheet.cells(Firstrow, Lastrow).Font.Color = vbBlack
Thanks,
Pinky