PC Review


Reply
 
 
Edgar
Guest
Posts: n/a
 
      1st Apr 2004
Hi

I found a wb last year called menushen which reverses the
text of all excel menus, I thought I would send it to a
few colleagues today for a joke but it isnt working
anymore. It reverses the first menu ie FILE but stops
after that with the error Object doesnt support this
method?

If anyone has time can you let me know whats happening

TIA

Private Sub Workbook_Open()
On Error Resume Next
For Each m1 In Application.CommandBars(1).Controls
m1.Caption = Reverse(m1.Caption)
For Each m2 In m1.Controls
m2.Caption = Reverse(m2.Caption)
For Each m3 In m2.Controls
m3.Caption = Reverse(m3.Caption)
Next m3
Next m2
Next m1
End Sub




Sub ReverseMenuText()
On Error Resume Next
For Each m1 In Application.CommandBars(1).Controls
m1.Caption = Reverse(m1.Caption)
For Each m2 In m1.Controls
m2.Caption = Reverse(m2.Caption)
For Each m3 In m2.Controls
m3.Caption = Reverse(m3.Caption)
Next m3
Next m2
Next m1
End Sub

Sub ResetMenu()
Application.CommandBars(1).Reset
End Sub

Function Reverse(MenuText As String) As String
' Returns menu item, backwards with original hot key
Dim Temp As String, Temp2 As String
Dim ItemLen As Integer, i As Integer
Dim HotKey As String * 1
Dim Found As Boolean

ItemLen = Len(MenuText)
Temp = ""
For i = ItemLen To 1 Step -1
If Mid(MenuText, i, 1) = "&" Then _
HotKey = Mid(MenuText, i + 1, 1) _
Else Temp = Temp & Mid(MenuText, i, 1)
Next i

' Convert reversed string to Proper case
Temp = Application.Proper(Temp)

' Insert & for hot key
Found = False
Temp2 = ""
For i = 1 To ItemLen - 1
If UCase(Mid(Temp, i, 1)) = UCase(HotKey) And Not
Found Then
Temp2 = Temp2 & "&"
Found = True
End If
Temp2 = Temp2 & Mid(Temp, i, 1)
Next i

' Transfer ellipses to end of string
If Left(Temp2, 3) = "..." Then Temp2 = Right(Temp2,
ItemLen - 3) & "..."

Reverse = Temp2
End Function

 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      1st Apr 2004
Edgar,

It worked fine for me. Where do you get the error?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Edgar" <(E-Mail Removed)> wrote in message
news:1708d01c417cb$b00d5440$(E-Mail Removed)...
> Hi
>
> I found a wb last year called menushen which reverses the
> text of all excel menus, I thought I would send it to a
> few colleagues today for a joke but it isnt working
> anymore. It reverses the first menu ie FILE but stops
> after that with the error Object doesnt support this
> method?
>
> If anyone has time can you let me know whats happening
>
> TIA
>
> Private Sub Workbook_Open()
> On Error Resume Next
> For Each m1 In Application.CommandBars(1).Controls
> m1.Caption = Reverse(m1.Caption)
> For Each m2 In m1.Controls
> m2.Caption = Reverse(m2.Caption)
> For Each m3 In m2.Controls
> m3.Caption = Reverse(m3.Caption)
> Next m3
> Next m2
> Next m1
> End Sub
>
>
>
>
> Sub ReverseMenuText()
> On Error Resume Next
> For Each m1 In Application.CommandBars(1).Controls
> m1.Caption = Reverse(m1.Caption)
> For Each m2 In m1.Controls
> m2.Caption = Reverse(m2.Caption)
> For Each m3 In m2.Controls
> m3.Caption = Reverse(m3.Caption)
> Next m3
> Next m2
> Next m1
> End Sub
>
> Sub ResetMenu()
> Application.CommandBars(1).Reset
> End Sub
>
> Function Reverse(MenuText As String) As String
> ' Returns menu item, backwards with original hot key
> Dim Temp As String, Temp2 As String
> Dim ItemLen As Integer, i As Integer
> Dim HotKey As String * 1
> Dim Found As Boolean
>
> ItemLen = Len(MenuText)
> Temp = ""
> For i = ItemLen To 1 Step -1
> If Mid(MenuText, i, 1) = "&" Then _
> HotKey = Mid(MenuText, i + 1, 1) _
> Else Temp = Temp & Mid(MenuText, i, 1)
> Next i
>
> ' Convert reversed string to Proper case
> Temp = Application.Proper(Temp)
>
> ' Insert & for hot key
> Found = False
> Temp2 = ""
> For i = 1 To ItemLen - 1
> If UCase(Mid(Temp, i, 1)) = UCase(HotKey) And Not
> Found Then
> Temp2 = Temp2 & "&"
> Found = True
> End If
> Temp2 = Temp2 & Mid(Temp, i, 1)
> Next i
>
> ' Transfer ellipses to end of string
> If Left(Temp2, 3) = "..." Then Temp2 = Right(Temp2,
> ItemLen - 3) & "..."
>
> Reverse = Temp2
> End Function
>



 
Reply With Quote
 
Edgar
Guest
Posts: n/a
 
      1st Apr 2004
Hi

I get the error on the following line - It is very weird
as it worked last time I used it.

For Each m3 In m2.Controls

TIA


>-----Original Message-----
>Edgar,
>
>It worked fine for me. Where do you get the error?
>
>--
>
>HTH
>
>Bob Phillips
> ... looking out across Poole Harbour to the Purbecks
>(remove nothere from the email address if mailing direct)
>
>"Edgar" <(E-Mail Removed)> wrote in

message
>news:1708d01c417cb$b00d5440$(E-Mail Removed)...
>> Hi
>>
>> I found a wb last year called menushen which reverses

the
>> text of all excel menus, I thought I would send it to a
>> few colleagues today for a joke but it isnt working
>> anymore. It reverses the first menu ie FILE but stops
>> after that with the error Object doesnt support this
>> method?
>>
>> If anyone has time can you let me know whats happening
>>
>> TIA
>>
>> Private Sub Workbook_Open()
>> On Error Resume Next
>> For Each m1 In Application.CommandBars(1).Controls
>> m1.Caption = Reverse(m1.Caption)
>> For Each m2 In m1.Controls
>> m2.Caption = Reverse(m2.Caption)
>> For Each m3 In m2.Controls
>> m3.Caption = Reverse(m3.Caption)
>> Next m3
>> Next m2
>> Next m1
>> End Sub
>>
>>
>>
>>
>> Sub ReverseMenuText()
>> On Error Resume Next
>> For Each m1 In Application.CommandBars(1).Controls
>> m1.Caption = Reverse(m1.Caption)
>> For Each m2 In m1.Controls
>> m2.Caption = Reverse(m2.Caption)
>> For Each m3 In m2.Controls
>> m3.Caption = Reverse(m3.Caption)
>> Next m3
>> Next m2
>> Next m1
>> End Sub
>>
>> Sub ResetMenu()
>> Application.CommandBars(1).Reset
>> End Sub
>>
>> Function Reverse(MenuText As String) As String
>> ' Returns menu item, backwards with original hot key
>> Dim Temp As String, Temp2 As String
>> Dim ItemLen As Integer, i As Integer
>> Dim HotKey As String * 1
>> Dim Found As Boolean
>>
>> ItemLen = Len(MenuText)
>> Temp = ""
>> For i = ItemLen To 1 Step -1
>> If Mid(MenuText, i, 1) = "&" Then _
>> HotKey = Mid(MenuText, i + 1, 1) _
>> Else Temp = Temp & Mid(MenuText, i, 1)
>> Next i
>>
>> ' Convert reversed string to Proper case
>> Temp = Application.Proper(Temp)
>>
>> ' Insert & for hot key
>> Found = False
>> Temp2 = ""
>> For i = 1 To ItemLen - 1
>> If UCase(Mid(Temp, i, 1)) = UCase(HotKey) And

Not
>> Found Then
>> Temp2 = Temp2 & "&"
>> Found = True
>> End If
>> Temp2 = Temp2 & Mid(Temp, i, 1)
>> Next i
>>
>> ' Transfer ellipses to end of string
>> If Left(Temp2, 3) = "..." Then Temp2 = Right(Temp2,
>> ItemLen - 3) & "..."
>>
>> Reverse = Temp2
>> End Function
>>

>
>
>.
>

 
Reply With Quote
 
Ian Ripsher
Guest
Posts: n/a
 
      1st Apr 2004
"Edgar" <(E-Mail Removed)> wrote in message
news:1708d01c417cb$b00d5440$(E-Mail Removed)...
> Hi
>
> I found a wb last year called menushen which reverses the
> text of all excel menus, I thought I would send it to a
> few colleagues today for a joke but it isnt working
> anymore. It reverses the first menu ie FILE but stops
> after that with the error Object doesnt support this
> method?
>
> If anyone has time can you let me know whats happening
>
> TIA


It also worked for me and I love it! Looks sort of like a Basque version???


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
April Fools Ǝиçεl Spyware Announcements 29 8th Apr 2009 06:27 PM
April Fools Programming, anyone? Susan Microsoft Excel Programming 0 1st Apr 2009 03:54 PM
April Fools 'hook' Duh_OZ Anti-Virus 1 1st Apr 2008 01:58 PM
April Fools! Mofaz DIY PC 4 3rd Apr 2007 08:35 PM
Planning anything from April Fools? Ian General Discussion 13 31st Mar 2006 01:27 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:45 PM.