View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default VBA - Formatting issue....

Hi
missd that part :-) Though you could also use then:
sub foo()
dim row_index as long
Application.Run "'Part D-1 Regular.xls'!Unprotect_Sheet_Password"
for row_index = 17 to 200
with activesheet.cells(row_index,"O")
if .value = "Bold" then
.offset(0,-12).font.bold=true
exit for
end if
end with
next
End Sub

--
Regards
Frank Kabel
Frankfurt, Germany


Do you realize that using If...ElseIf means that the code will stop
after the first time that condition evaluates to true? You could do
something like this:

For x = 17 To 20
If Worksheets("April").Cells(x, 15).Value = "BOLD" Then
Worksheets("April").Cells(x, 3).Font.Bold = True
End If
Next x

- Pikus


---
Message posted from http://www.ExcelForum.com/