multilanguage custom menus

G

Guest

I need to create custom menu with captions using english and non-english
characters, or if this is not possible just non-english characters. How in my
code I can enter required text containing non-english characters ? When I am
copying my translated caption from Word and pasting into my code it is giving
me ????. Is it possible to do what I need ? How ?

Thanks for help.

Tony
 
K

keepITcool

Since it's probably unicode text, iso copying them as constants in VBA
why not copy them to a range on a (hidden) sheet,
and read them from there when you create the toolbar.

makes maintenance a lot easier too.


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Tony wrote :
 
G

Guest

Thank you for your suggestion but I need a bit more help to have it working.
When in my code I am refering to the range containing my text the toolbar is
displaying nothing. My code looks like

.Caption = menu1

where menu1 is the name of the range with the text to be displayed on the
custome menu. I have tried all different combination and I can not have any
text. My old line of code which displayed the text was:

.Caption = "My menu"

If menu1 contain text why the text is not displayed ??? Please help.

Regards,

Tony
 
K

keepITcool

ehhh....

if you dont know how to reference cells..
please study the Excel Object Model.

it's a basic and necessary skill if you ever want
to automate excel with VBA.

in fact it's so basic that i decline to answer you


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Tony wrote :
 
V

Vasant Nanavati

Try:

..Caption = Range("menu1")

--

Vasant

Tony said:
Thank you for your suggestion but I need a bit more help to have it working.
When in my code I am refering to the range containing my text the toolbar is
displaying nothing. My code looks like

.Caption = menu1

where menu1 is the name of the range with the text to be displayed on the
custome menu. I have tried all different combination and I can not have any
text. My old line of code which displayed the text was:

.Caption = "My menu"

If menu1 contain text why the text is not displayed ??? Please help.

Regards,

Tony
 
G

Guest

Hi keepITcool

It is a bit harsh comment. It was much simpler to point me to the right
direction as Vasant did and I have it working. But thank you anyway. Your
initial response did help me greatly.

Tony
 
G

Guest

Hi Vasant,

Thank you for help. It works now. Sometimes it is realy messy and hard to
find the correct syntax. I was referencing without the word Range, just using
range name. I have tried the direct addressing too and it did not work. I
have not seen anywhere in the books the syntax you pointed me to. Thanks
again for help.

Tony
 
K

keepITcool

Vasant's answer was:

..caption = Range("menu")

I quote from your answer to Vasant..

'I have tried the direct addressing too and it did not work. I
have not seen anywhere in the books the syntax you pointed me to.
Thanks
again for help.

hmmm???!!!! never seens this? some books you've got ;(

in VBE press F1 and search for:
How to Reference Cells and Ranges

His exact syntax is explained here:
Referring to Named Ranges


alternatives:
..caption = [menu] or = evaluate("menu")

note that all the syntax above is unqualified,
thus yields data from the activeworkbook only.



--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Tony wrote :
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top