Can someone explain to me why a code that works in OfficeXPsp2 French does
not work in Office2003 English.
codes such as;
appplication.displayalert= false
application.close
Thanks!
MD
Can someone explain to me why a code that works in OfficeXPsp2 French does
not work in Office2003 English.
codes such as;
appplication.displayalert= false
application.close
Thanks!
MD
Last edited by Cutter; 09-07-2012 at 06:41 PM. Reason: Amended title
The code should work.
It doesn't look like you pasted it from your code. Please do.
What behavior of Excel makes you say "not work"?
--
Kind regards,
Niek Otten
"MD" <[email protected]> wrote in message
news:[email protected]...
> Can someone explain to me why a code that works in OfficeXPsp2 French does
> not work in Office2003 English.
>
> codes such as;
> appplication.displayalert= false
> application.close
>
> Thanks!
>
> MD
>
Here is one of the codes that do not work in the english version. Would the
regional settings have anything to do with it?
Sub quitter()
Dim Msg, Style, Title, Response, MyString
Msg = "Voulez-vous vraiment quitter ce dossier?"
Style = vbYesNo + vbCritical + vbDefaultButton
Title = "Quiter ce dossier"
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then
MyString = "Yes"
Dim Msg2, Style2, Title2, Response2, MyString2
Msg2 = "Voulez-vous sauvegarder ce dossier?"
Style2 = vbYesNo + vbExclamation + vbDefaultButton
Title2 = "Sauvegarde du dossier"
Response2 = MsgBox(Msg2, Style2, Title2)
If Response2 = vbYes Then
MyString2 = "Yes"
Application.Run ("saisie.xls!sauver")
Else
MyString2 = "No"
End If
Application.ScreenUpdating = False
Windows("menu.xls").Activate
Windows("saisie.xls").Activate
Application.Run ("taux.xls!close_from_saisie")
Application.DisplayAlerts = False
ActiveWorkbook.Close
Else
MyString = "No"
Range("c10").Select
End If
End Sub
"Niek Otten" <[email protected]> a écrit dans le message de news:
%23%[email protected]...
> The code should work.
> It doesn't look like you pasted it from your code. Please do.
> What behavior of Excel makes you say "not work"?
>
> --
> Kind regards,
>
> Niek Otten
>
> "MD" <[email protected]> wrote in message
> news:[email protected]...
>> Can someone explain to me why a code that works in OfficeXPsp2 French
>> does not work in Office2003 English.
>>
>> codes such as;
>> appplication.displayalert= false
>> application.close
>>
>> Thanks!
>>
>> MD
>>
>
>
You didn't really answer my question:
"What behavior of Excel makes you say "not work"?"
Also, I don't find the "application.close" that you mentioned in your first
post.
Could it be that you're a bit inaccurate in your questions?
--
Kind regards,
Niek Otten
"MD" <[email protected]> wrote in message
news:[email protected]...
> Here is one of the codes that do not work in the english version. Would
> the regional settings have anything to do with it?
>
> Sub quitter()
> Dim Msg, Style, Title, Response, MyString
> Msg = "Voulez-vous vraiment quitter ce dossier?"
> Style = vbYesNo + vbCritical + vbDefaultButton
> Title = "Quiter ce dossier"
> Response = MsgBox(Msg, Style, Title)
> If Response = vbYes Then
> MyString = "Yes"
>
> Dim Msg2, Style2, Title2, Response2, MyString2
> Msg2 = "Voulez-vous sauvegarder ce dossier?"
> Style2 = vbYesNo + vbExclamation + vbDefaultButton
> Title2 = "Sauvegarde du dossier"
> Response2 = MsgBox(Msg2, Style2, Title2)
> If Response2 = vbYes Then
> MyString2 = "Yes"
> Application.Run ("saisie.xls!sauver")
> Else
> MyString2 = "No"
> End If
>
> Application.ScreenUpdating = False
> Windows("menu.xls").Activate
> Windows("saisie.xls").Activate
> Application.Run ("taux.xls!close_from_saisie")
> Application.DisplayAlerts = False
> ActiveWorkbook.Close
> Else
> MyString = "No"
> Range("c10").Select
> End If
> End Sub
>
>
> "Niek Otten" <[email protected]> a écrit dans le message de news:
> %23%[email protected]...
>> The code should work.
>> It doesn't look like you pasted it from your code. Please do.
>> What behavior of Excel makes you say "not work"?
>>
>> --
>> Kind regards,
>>
>> Niek Otten
>>
>> "MD" <[email protected]> wrote in message
>> news:[email protected]...
>>> Can someone explain to me why a code that works in OfficeXPsp2 French
>>> does not work in Office2003 English.
>>>
>>> codes such as;
>>> appplication.displayalert= false
>>> application.close
>>>
>>> Thanks!
>>>
>>> MD
>>>
>>
>>
>
>
Hi Niek
Ok here it is...
This code was originaly written on Excel Office97 french edition. It has
since then been edited with Excel XP french edition. When the code runs on
Office2000 (below I said Office2003 but it`s 2000) English edition, I get
this message.
Run-time error '2147319784 (80028018)':
Methode 'Select' of object 'Range' failed
just by runing this code;
sub xxxx()
range("A1").Select
End Sub
Does this clue you in something????
regards
MD
"Niek Otten" <[email protected]> wrote in message
news:[email protected]...
> You didn't really answer my question:
>
> "What behavior of Excel makes you say "not work"?"
>
> Also, I don't find the "application.close" that you mentioned in your
> first post.
>
> Could it be that you're a bit inaccurate in your questions?
>
> --
> Kind regards,
>
> Niek Otten
>
>
>
> "MD" <[email protected]> wrote in message
> news:[email protected]...
>> Here is one of the codes that do not work in the english version. Would
>> the regional settings have anything to do with it?
>>
>> Sub quitter()
>> Dim Msg, Style, Title, Response, MyString
>> Msg = "Voulez-vous vraiment quitter ce dossier?"
>> Style = vbYesNo + vbCritical + vbDefaultButton
>> Title = "Quiter ce dossier"
>> Response = MsgBox(Msg, Style, Title)
>> If Response = vbYes Then
>> MyString = "Yes"
>>
>> Dim Msg2, Style2, Title2, Response2, MyString2
>> Msg2 = "Voulez-vous sauvegarder ce dossier?"
>> Style2 = vbYesNo + vbExclamation + vbDefaultButton
>> Title2 = "Sauvegarde du dossier"
>> Response2 = MsgBox(Msg2, Style2, Title2)
>> If Response2 = vbYes Then
>> MyString2 = "Yes"
>> Application.Run ("saisie.xls!sauver")
>> Else
>> MyString2 = "No"
>> End If
>>
>> Application.ScreenUpdating = False
>> Windows("menu.xls").Activate
>> Windows("saisie.xls").Activate
>> Application.Run ("taux.xls!close_from_saisie")
>> Application.DisplayAlerts = False
>> ActiveWorkbook.Close
>> Else
>> MyString = "No"
>> Range("c10").Select
>> End If
>> End Sub
>>
>>
>> "Niek Otten" <[email protected]> a écrit dans le message de news:
>> %23%[email protected]...
>>> The code should work.
>>> It doesn't look like you pasted it from your code. Please do.
>>> What behavior of Excel makes you say "not work"?
>>>
>>> --
>>> Kind regards,
>>>
>>> Niek Otten
>>>
>>> "MD" <[email protected]> wrote in message
>>> news:[email protected]...
>>>> Can someone explain to me why a code that works in OfficeXPsp2 French
>>>> does not work in Office2003 English.
>>>>
>>>> codes such as;
>>>> appplication.displayalert= false
>>>> application.close
>>>>
>>>> Thanks!
>>>>
>>>> MD
>>>>
>>>
>>>
>>
>>
>
>
No.
Maybe a chart sheet was active instead of a worksheet?
--
Kind regards,
Niek Otten
"MD" <[email protected]> wrote in message
news:[email protected]...
> Hi Niek
>
> Ok here it is...
>
> This code was originaly written on Excel Office97 french edition. It has
> since then been edited with Excel XP french edition. When the code runs
> on
> Office2000 (below I said Office2003 but it`s 2000) English edition, I get
> this message.
>
> Run-time error '2147319784 (80028018)':
> Methode 'Select' of object 'Range' failed
>
> just by runing this code;
> sub xxxx()
> range("A1").Select
> End Sub
>
> Does this clue you in something????
>
> regards
> MD
>
>
> "Niek Otten" <[email protected]> wrote in message
> news:[email protected]...
>> You didn't really answer my question:
>>
>> "What behavior of Excel makes you say "not work"?"
>>
>> Also, I don't find the "application.close" that you mentioned in your
>> first post.
>>
>> Could it be that you're a bit inaccurate in your questions?
>>
>> --
>> Kind regards,
>>
>> Niek Otten
>>
>>
>>
>> "MD" <[email protected]> wrote in message
>> news:[email protected]...
>>> Here is one of the codes that do not work in the english version. Would
>>> the regional settings have anything to do with it?
>>>
>>> Sub quitter()
>>> Dim Msg, Style, Title, Response, MyString
>>> Msg = "Voulez-vous vraiment quitter ce dossier?"
>>> Style = vbYesNo + vbCritical + vbDefaultButton
>>> Title = "Quiter ce dossier"
>>> Response = MsgBox(Msg, Style, Title)
>>> If Response = vbYes Then
>>> MyString = "Yes"
>>>
>>> Dim Msg2, Style2, Title2, Response2, MyString2
>>> Msg2 = "Voulez-vous sauvegarder ce dossier?"
>>> Style2 = vbYesNo + vbExclamation + vbDefaultButton
>>> Title2 = "Sauvegarde du dossier"
>>> Response2 = MsgBox(Msg2, Style2, Title2)
>>> If Response2 = vbYes Then
>>> MyString2 = "Yes"
>>> Application.Run ("saisie.xls!sauver")
>>> Else
>>> MyString2 = "No"
>>> End If
>>>
>>> Application.ScreenUpdating = False
>>> Windows("menu.xls").Activate
>>> Windows("saisie.xls").Activate
>>> Application.Run ("taux.xls!close_from_saisie")
>>> Application.DisplayAlerts = False
>>> ActiveWorkbook.Close
>>> Else
>>> MyString = "No"
>>> Range("c10").Select
>>> End If
>>> End Sub
>>>
>>>
>>> "Niek Otten" <[email protected]> a écrit dans le message de news:
>>> %23%[email protected]...
>>>> The code should work.
>>>> It doesn't look like you pasted it from your code. Please do.
>>>> What behavior of Excel makes you say "not work"?
>>>>
>>>> --
>>>> Kind regards,
>>>>
>>>> Niek Otten
>>>>
>>>> "MD" <[email protected]> wrote in message
>>>> news:[email protected]...
>>>>> Can someone explain to me why a code that works in OfficeXPsp2 French
>>>>> does not work in Office2003 English.
>>>>>
>>>>> codes such as;
>>>>> appplication.displayalert= false
>>>>> application.close
>>>>>
>>>>> Thanks!
>>>>>
>>>>> MD
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
>
Hi MD,
I solved a similar situation in a strange way (got this hint from a colleague). An application (Office XP .xlt in compatibility mode) was running on my desktop PC (German OS, German language pack, German Office 2010), but not on my notebook (englisch OS and Office 2010, German language pack).
What finally solved the problem was to strip all macros off the file, save it, close Excel.
Open Excel again, save the template as .xltm. Re-install the macros. Save, close Excel.
Open the file again, save this time again as Excel 97-2003 template (.xlt) - The problem was gone for good!
I don't have an explanation WHY this works, but it does!
HTH
BR
Mike
Mike 1001
_________________________
Let's keep trying, one day we'll succeed!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks