Greek Letters in Modules
Greek Letters in Modules
(OP)
hi,
I am looking for help on 2 issues and will appreciate any input.
1--I have a macro which results in displaying a mathematical expression(string) in a cell using some of the string and text functions. How can Greek symbols such as PI or PHI be included within the module functions so they end up in the final expressions? or can it be done at all?
2--How can a single module be protected or hidden by assigning a password.
Thanks.
I am looking for help on 2 issues and will appreciate any input.
1--I have a macro which results in displaying a mathematical expression(string) in a cell using some of the string and text functions. How can Greek symbols such as PI or PHI be included within the module functions so they end up in the final expressions? or can it be done at all?
2--How can a single module be protected or hidden by assigning a password.
Thanks.





RE: Greek Letters in Modules
TTFN
RE: Greek Letters in Modules
about your #1, try this macro.
It reads from cell B2 a circle diameter (e.g. B2 value= 1.5) and writes in B3 its area expliciting PI.
Also it writes in B5 a sentence using mixed Arial and GreekC font (of course you can specify a different one).
Hope it helps.
_LF
Sub GreekInCell()
'
'
Range("B3").Select
ActiveCell.FormulaR1C1 = Str(Range("B2").Value ^ 2) & "*p/4"
N% = Len(Range("B3"))
With ActiveCell.Characters(Start:=N% - 2, Length:=1).Font
.Name = "GreekC"
.FontStyle = "Regular"
End With
Range("B5").Select
DD$ = "First letters of Greek alphabet are: ": U% = Len(DD$) + 1
DD$ = DD$ + "a(alpha), ": D% = Len(DD$) + 1
DD$ = DD$ + "b (beta), ": T% = Len(DD$) + 1
DD$ = DD$ + "g (gamma)"
ActiveCell.FormulaR1C1 = DD$
With ActiveCell
.Characters(Start:=U%, Length:=1).Font.Name = "GreekC"
.Characters(Start:=D%, Length:=1).Font.Name = "GreekC"
.Characters(Start:=T%, Length:=1).Font.Name = "GreekC"
End With
End Sub
RE: Greek Letters in Modules
RE: Greek Letters in Modules
e.g type [Alt] + 0248 to get ΓΈ.
Check what's available in the character map.
RE: Greek Letters in Modules
from within the vba module, select Tools - VBAProject Properties...
select the protection tab.
have fun and good luck!
-pmover
RE: Greek Letters in Modules
sdz,
very helpful pointer. I cant however find an "Alt+..." keystroke for the greek letter "Pi". Am I missing it? It seems that only some of the characters have the "Alt+..." keystroke associated with them.
Thanks again
RE: Greek Letters in Modules
Am I missing something?
RE: Greek Letters in Modules
I'm not sure how you would do it if you want to generate text in a module for display in a sheet.