Date functions in VBA (English/Spanish)

R

Roderick O'Regan

I'm trying to create a template in Word which is normally used with
the English version of Word.

One of the forms has a combobox which sets out the current month using
the following code:
cmbIssueMonth.Value = Format(Date, "mmmm")

The problem arises when colleagues in Spain open the same template and
tell me they get an error which leads back to the piece of coding
above.

Is there something I could write, please, which could act as a
"catch-all" code and put the month name in the combobox corresponding
to the language version of Word they may be using? Or is VBA all the
same as regards dates in any language?

I hope it doesn't muddy the waters too much but the permutations of
machines being used in the Spanish office is interesting:
Spanish Windows - Spanish Word
Spanish Windows - English Word
English Windows - Spanish Word
English Windows - English Word

However, I appreciate that the above list might have no effect on what
I'm trying to do. It's the basic statement which could need amending.
 
H

Helmut Weber

Hi Roderick,
maybe this can help you:

MsgBox Application.Language
MsgBox System.LanguageDesignation

Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
 

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