Hi all,
I would like to change the list separator in the registry HKEY_CURRENT_USER\Control Panel\International\sList form ";" to "|" using VBA from Excel.
this small code gives me the current separator:
Set WShell = CreateObject("WScript.Shell")
GetRegistry = WShell.RegRead("HKEY_CURRENT_USER\Control Panel\International\sList")
Then writing a new separator:
Set WShell = CreateObject("WScript.Shell")
WShell.RegWrite "HKEY_CURRENT_USER\Control Panel\International\sList", "|", "REG_SZ")
Looking in the Control Panel the separator has changed, but ....
saving my workbook as a csv-file
ActiveWorkbook.SaveAs filnavn, xlCSV, Local:=True
gives me a file with ";" as separator???
If I manually change the separator everythings works fine.
Why is my code not working?
Thanks in advance
I would like to change the list separator in the registry HKEY_CURRENT_USER\Control Panel\International\sList form ";" to "|" using VBA from Excel.
this small code gives me the current separator:
Set WShell = CreateObject("WScript.Shell")
GetRegistry = WShell.RegRead("HKEY_CURRENT_USER\Control Panel\International\sList")
Then writing a new separator:
Set WShell = CreateObject("WScript.Shell")
WShell.RegWrite "HKEY_CURRENT_USER\Control Panel\International\sList", "|", "REG_SZ")
Looking in the Control Panel the separator has changed, but ....
saving my workbook as a csv-file
ActiveWorkbook.SaveAs filnavn, xlCSV, Local:=True
gives me a file with ";" as separator???
If I manually change the separator everythings works fine.
Why is my code not working?
Thanks in advance