Change colour

  • Thread starter Thread starter millwalll
  • Start date Start date
M

millwalll

hi all,
Is there a way in a form to make a button that on click will change the
colour of text on words I select ?

many thanks
 
Private Sub CommandButton1_Click()

Dim myCell As Range

For Each myCell In Selection.Cells

myCell.Font.ColorIndex = 50
Next myCell

End Sub
 
Hi Greg,

Thanks for that, only problem I have is when I change colour it does not
show in the form the new colour. I need to be able to select code change
colour of it and the change to show in the form. The user will use this to
mark what serial key's have been used and whats ones have not be used. With
the code you gave me works but it only makes changes to the excel page what
they wont be able to see. Is there anyway to make the changes show in the
form ??

Thanks again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top