Hi guys,
Is it possible to use multiple colors in a multiline textbox.
It's because I have a userform with some buttons like for opening a txt/csv file.
And in the form I have a multiline textbox that I use as kind of LOG window.
So I use it like:
txtLog.Value = txtLog.Value & "File selected: " & csvFilename & vbCrLf
And I would like to paste the things that are correct in GREEN and things they go wrong in RED and maybe other things just in a default black.
The only thing I find is forecolor but like in the example below the whole textbox changes color:
txtLog.Value = txtLog.Value & "File selected: " & csvFilename & vbCrLf
txtLog.ForeColor = RGB(0, 255, 0)
txtLog.Value = txtLog.Value & "Some green text " & vbCrLf
txtLog.ForeColor = RGB(0, 0, 255)
txtLog.Value = txtLog.Value & "Some Blue text text " & vbCrLf
I suppose this doesn't work because forecolor changes the color for the whole textbox.
Is there a way to achieve what I'm trying to do?
Thanks in advance.
Cheers
Bookmarks