ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   multilanguage custom menus (https://www.excelbanter.com/excel-programming/328538-multilanguage-custom-menus.html)

tony

multilanguage custom menus
 
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


keepITcool

multilanguage custom menus
 
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 :

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


tony

multilanguage custom menus
 
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

"keepITcool" wrote:

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 :

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



keepITcool

multilanguage custom menus
 
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 :

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

"keepITcool" wrote:

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 :

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



Vasant Nanavati

multilanguage custom menus
 
Try:

..Caption = Range("menu1")

--

Vasant

"Tony" wrote in message
...
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

"keepITcool" wrote:

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 :

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





tony

multilanguage custom menus
 
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

"keepITcool" wrote:

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 :

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

"keepITcool" wrote:

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 :

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



tony

multilanguage custom menus
 
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

"Vasant Nanavati" wrote:

Try:

..Caption = Range("menu1")

--

Vasant

"Tony" wrote in message
...
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

"keepITcool" wrote:

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 :

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





keepITcool

multilanguage custom menus
 

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 he
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 :

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

"keepITcool" wrote:

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 :

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

"keepITcool" wrote:

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 :

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




All times are GMT +1. The time now is 03:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com