ericc
10-13-2008, 08:04 AM
Hi
I try to write a macro to be used as an add-in in Excel and in Word.
Because I am lazy, I dreamed to have the same macro/add-in for both application.
How innocent I am !! :doh:
Of course the VBA from Excel, isn't the same as the VBA from Word! :(
How it could be, they don't come from the same company and aren't "integrated" in the same umbrella as OpenOffice (ironic mode, sorry).
I try to do a real simple thing. As my colleague use a lot of different regional setting, I try to read the "ListSeparator":
in Excel:
strListSep = Application.International(xlListSeparator) in Word:
strListSep = Application.International(wdListSeparator) Of course, the index of the parameter is not the same !!! :banghead:
Now my question:
Is it possible from the macro to detect from which application (Word or Excel) the macro was launched ?
Any help will be really appreciate
Best regards
ericc
I try to write a macro to be used as an add-in in Excel and in Word.
Because I am lazy, I dreamed to have the same macro/add-in for both application.
How innocent I am !! :doh:
Of course the VBA from Excel, isn't the same as the VBA from Word! :(
How it could be, they don't come from the same company and aren't "integrated" in the same umbrella as OpenOffice (ironic mode, sorry).
I try to do a real simple thing. As my colleague use a lot of different regional setting, I try to read the "ListSeparator":
in Excel:
strListSep = Application.International(xlListSeparator) in Word:
strListSep = Application.International(wdListSeparator) Of course, the index of the parameter is not the same !!! :banghead:
Now my question:
Is it possible from the macro to detect from which application (Word or Excel) the macro was launched ?
Any help will be really appreciate
Best regards
ericc