Application.Speech.Speak "Stop Violating me, I'm only a child!"
ActiveSheet.DisplayRightToLeft = True
It's an icon for the toolbars, or alternatively
Does this have any practical application, or is it just there to mess with people's heads ?Code:ActiveSheet.DisplayRightToLeft = True
Private Sub Worksheet_Change(ByVal Target As Range)
Dim sFormulaExtract As String
'blanks seem to count as numeric so check the cell isn't blank
If IsNumeric(Target.Value) And Not Target.Value = "" Then
'grab the formula
Let sFormulaExtract = Target.Formula
'remove the = so we double have 2 of them
sFormulaExtract = Replace(sFormulaExtract, "=", "")
'place the formula back but with the bahttext formula
'wrapped around it
Target.FormulaR1C1 = "=BAHTTEXT(" & sFormulaExtract & ")"
'change to left because you're evil and don't
'think bahttext is confusing enough
If Not ActiveSheet.DisplayRightToLeft Then _
ActiveSheet.DisplayRightToLeft = True
End If
End Sub
Sub EnoughNow()
Dim sWorkingFormula As String
Dim cell
'make sure you've not still got the selection change
'code working or it'll all change straight back again!
For Each cell In Selection
'check whether bahttext has been added
If Left(cell.Formula, 5) = "=BAHT" Then
Let sWorkingFormula = cell.Formula
'remove last bracket
Let sWorkingFormula = Left(sWorkingFormula, Len(sWorkingFormula) - 1)
'remove bahttext formula
Let sWorkingFormula = Replace(sWorkingFormula, "=BAHTTEXT(", "=")
'put formula back how it was because you're actually
'a nice person deep down - just a bit misunderstood
cell.Formula = sWorkingFormula
End If
Next
'change the screen back
If ActiveSheet.DisplayRightToLeft Then ActiveSheet.DisplayRightToLeft = False
End Sub
Just makes it easier if you're working in Hebrew, Arabic or another of the right to left languages.
I must admit I'm not familiar with Hebrew, Arabic, or any of the other R2LLs.
BUT, I would imagine that the R2L function does not actually do what you're suggesting, because it doesn't reverse cell contents.
Microsoft Office provides right-to-left (right-to-left: Refers to keyboard settings, document views, user interface objects, and the direction in which text is displayed. Arabic and Hebrew are right-to-left languages.) functionality and features designed to support languages that work in a right-to-left or a combined right-to-left, left-to-right environment for text entering, editing, and display.
Public Sub lol()
Dim x As Long
Application.Speech.Speak "This is the song that never ends!"
Application.Speech.Speak "Yes it goes on and on my friend!"
Application.Speech.Speak "Some people starting singing it, not knowing what it was!"
Application.Speech.Speak "And we'll continue singing it forever just because!"
Application.Speech.Speak "This is the song that never ends!"
Do
x = Application.RandBetween(1, 4)
Select Case x
Case 1
Application.Speech.Speak "This is the song that never ends!"
Case 2
Application.Speech.Speak "Yes it goes on and on my friend!"
Case 3
Application.Speech.Speak "Some people starting singing it, not knowing what it was!"
Case 4
Application.Speech.Speak "And we'll continue singing it forever just because!"
Case Else
End Select
Loop
End Sub
Fun with Application.Speech.Speak"
Code:Public Sub lol() Dim x As Long Application.Speech.Speak "This is the song that never ends!" Application.Speech.Speak "Yes it goes on and on my friend!" Application.Speech.Speak "Some people starting singing it, not knowing what it was!" Application.Speech.Speak "And we'll continue singing it forever just because!" Application.Speech.Speak "This is the song that never ends!" Do x = Application.RandBetween(1, 4) Select Case x Case 1 Application.Speech.Speak "This is the song that never ends!" Case 2 Application.Speech.Speak "Yes it goes on and on my friend!" Case 3 Application.Speech.Speak "Some people starting singing it, not knowing what it was!" Case 4 Application.Speech.Speak "And we'll continue singing it forever just because!" Case Else End Select Loop End Sub