Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
The following macro run until the language inside the control panel has not been set to english. The problem I have is that "Shell Cmdl$, vbNormalFocus" show a box but the macro run during that time. If the language is not set to english before the macro start, Shell Cmdl will be shown 2 times (instead of one) even if the language is set to english when the first box is shown. What happens is that before the user choose the value (first time) "Shell ...", the macro run and the new parameters are set to old value. Any idea? Thanks! Alex Sub test() 512 = GetUserDefaultLCID() iRet1 = GetLocaleInfo(Locale, LOCALE_SENGLANGUAGE, lpLCDataVar, 0) Symbol = String$(iRet1, 0) iRet2 = GetLocaleInfo(Locale, LOCALE_SENGLANGUAGE, Symbol, iRet1) 'GetLocaleInfo(Locale, LOCALE_SDATE, Symbol, iRet1) pos = InStr(Symbol, Chr$(0)) If pos 0 Then Symbol = Left$(Symbol, pos - 1) sLang = Symbol End If If sLang < "English" Then MsgBox ("The regional settings must be English." & Chr(10) & "Your currently setting are " & sLang & ". Please select English in the next box") Cmdl = "rundll32.exe shell32.dll,Control_RunDLL intl.cpl" + ",,5" Shell Cmdl$, vbNormalFocus GoTo 512 End If End Sub -- Alex St-Pierre |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I stop Series Line from Dropping to Zero | Excel Discussion (Misc queries) | |||
how shell open AcroReader w/command line filename? | Excel Programming | |||
Stop the line when 0 is reached | Charts and Charting in Excel | |||
Macro problem on, Yellowed line - previous line or next line. | Excel Programming | |||
Commands at the line prompt using Shell | Excel Programming |