Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing Locale in VBA/calling VB code from VBa

Status
Not open for further replies.

nuandaEB

Technical User
Oct 22, 2002
8
CA
I am trying to do the following -- I have a macro that asks for a date range, and then creates a text entry in an MS Word doc for each of the dates in the range.

After displaying an English (US) date, I would like to convert that date to the equivalent date in a different calendar (e.g. Hebrew).

So I need two things:
1- Ensure that the English date be formatted correctly, irrespective of the OS's regional settings. I understand that the locale cannot be set in VBA since this requires a change to the registry (but I this can be done by using the shell command)

2- I need to pass the english date to a function that will do the hebrew date conversion. I found VB code for doing this, but it's not compiled and I don't have visual studio.

I'm pretty new to VBA (but not to programming) and am not sure if the above makes sense. Can anybody confirm that I'm on the right track?

Also, if anybody has advice on calling VB code from VBA, that would be helpful.

Thanks,

EB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top