Cell formats change while opening the file via VB
I think what is happening is when you double click the file the file is
opening with a different command line option then when you open the file
directly from excel.
Go to the following menu option
1) Right Click Start Button - Select Explore
2) Tools - Folder Options - Folder Types
3) Find XLS
4) Advance - Open - Edit
a) Post the Application used to perform Action. Include any slash options
like /e below
"C:\Program Files\Microsoft Office\Office10\EXCEL.EXE" /e
b) Is DDE checked?
c) What is the DDE message or other box info like: [open("%1")]
"SupperDuck" wrote:
Dear all,
I have a main macro that opens some other excel files. The problem occurs
with only one book.
If we open the file with double clicking on it (no macros), the formats are
ok. But when we try to open it from another file, with the below code;
Sub a()
Set wb = Workbooks.Open(ThisWorkbook.Path & "\Bom_Zebom.xls")
wb.Activate
End Sub
The formats are being changed like;
3,97 changes to 3.970.000
40,68 changes to 40.680.000
0,61 changes to 0,610000
the last value, 0,610000 is in fact " 0,610000" which seems that the
values lower than 1 have around eight spaces within the new file while being
opened with the macro.
Just for your information;
1. The excel data is downloaded from SAP.
2. In Turkish, you use "." to show the multiplies of 1000, and "," to show
the decimal places. For example;
In English;
1,540.8 is written as 1.540,8 in Turkish. May be, the problem occurs because
of that, just an idea.
Could you please help how i can solve this problem ?
Thanks & regards,
Veysel
|