View Single Post
  #17   Report Post  
Posted to microsoft.public.excel.programming
Pierre62 Pierre62 is offline
external usenet poster
 
Posts: 14
Default You are wonderful

At the moment I have to accept all macros utherwise yours will not work.
I think this is not very safe.
There is an option to block all macros except the ones which are digitally
signed.
I made a certificate with selcert.exe but it still does not work.

Pierre



"Rick Rothstein" wrote:

I'm not sure what you mean by "digitally sign the work"... just copy/paste
them into your workbook where indicated and they are yours to use.

--
Rick (MVP - Excel)


"Pierre62" wrote in message
...
Hello Rick, Keiji Gary's student and Bernie,

I don't know what went wrong but after saving may spreadsheet and
reopening
it again the next day all my sheets were blank.
Fortunally I have a backup of a month ago so I did not loose toot much
work.

I had to allow all macros. Is it possible to digitally sign the work you
did
for me?

Grand Slam for you guys.
I am so happy.

Pierre

"Pierre62" wrote:

Hello all, OssieMac,

I use excel to work out my conventions in the noble Bridge game.
Often I use things like 2™¦.
I like to change the colour of the ™¦ symbol into orange.
I do it by hand and it takes a lot of time.
I saw the question of Kay and the code of OssieMac is just what I need.

Who can help me to change the code to work with the symbols I use in the
colours I like?

™£ green
™¦ orange
™¥ red
™* blue
NT yellow


In advance, I thank you very much.
Pierre


Ossiemac gave the following code:

Do I interpret your comment to mean that " eg" can appear more than once
in
the cells? If so, then the following will fix it although you probably do
not
need it now if Gary's macro did the job.


Sub Format_Text()
Dim strToFind As String
Dim lngTofind As Long
Dim rngUsed As Range
Dim foundCell As Range
Dim startPos As Long
Dim firstAddress As String
Dim i As Long

strToFind = " eg" 'Set to required string

lngTofind = Len(strToFind)

With Sheets("Sheet1") 'Edit for your sheet name
Set rngUsed = .UsedRange
End With

With rngUsed
Set foundCell = .Find(What:=strToFind, _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False, _
SearchFormat:=False)

If Not foundCell Is Nothing Then
firstAddress = foundCell.Address

Do
For i = 1 To Len(foundCell)
startPos = InStr(i, foundCell, strToFind)
If startPos 0 Then
With foundCell.Characters(Start:=startPos, _
Length:=lngTofind).Font
.Color = vbRed
'.Bold = True 'Other formatting if required
End With
End If
Next i
Set foundCell = .FindNext(foundCell)
Loop While Not foundCell Is Nothing And _
foundCell.Address < firstAddress
End If
End With
End Sub