M
Marco
I am opening an Excel workbook with the code:
If ExcelRuns() Then
Set oapp = GetObject(, "Excel.Application")
Else
Set oapp = CreateObject("Excel.Application")
End If
This all works fine. I can open an Excel file and change
stuff in it.
However somewhere in the code I want to select a sheet:
oapp.sheets("sheet" & i).SELECT
Unfortunately in Dutch a "sheet" is called a "blad" so
when a Dutch version of Excel runs this code generates an
error.
Is there a way to find out which version of Excel is
running so I can use code like:
If oapp.???.language = "US" Then
oapp.sheets("sheet" & i).SELECT
Else 'Dutch in this case
oapp.sheets("blad" & i).SELECT
End If
I could not find a property of the object which shows the
language of the Excel running but perhaps there is a way
to obtain this information.
Many thanks
Marco
If ExcelRuns() Then
Set oapp = GetObject(, "Excel.Application")
Else
Set oapp = CreateObject("Excel.Application")
End If
This all works fine. I can open an Excel file and change
stuff in it.
However somewhere in the code I want to select a sheet:
oapp.sheets("sheet" & i).SELECT
Unfortunately in Dutch a "sheet" is called a "blad" so
when a Dutch version of Excel runs this code generates an
error.
Is there a way to find out which version of Excel is
running so I can use code like:
If oapp.???.language = "US" Then
oapp.sheets("sheet" & i).SELECT
Else 'Dutch in this case
oapp.sheets("blad" & i).SELECT
End If
I could not find a property of the object which shows the
language of the Excel running but perhaps there is a way
to obtain this information.
Many thanks
Marco