tamatea2010
New Member
- Joined
- Apr 22, 2019
- Messages
- 6
The text path is:
d:\Users\Yann\Desktop\QW787_Fuel.cfg
The text content is:
[Config]
Units=1
[fuel.0]
LeftMain=36983
RightMain=36983
Center=22818
The values to be replaced are the numbers after:
LeftMain=
RightMain=
Center=
An example of the new values that will be extracted from Excel file are:
Cell D43 value = 5000
Cell D45 value = 5000
Cell D44 value = 600
Expected text file after replacement:
[Config]
Units=1
[fuel.0]
LeftMain=5000
RightMain=5000
Center=600
The values to be replaced are variable (numbers can vary from 0 to 99999).
I do not know much about vba and need your help guys to have a vba code that will be launched from Excel and replace the values in the text file after I change them in excel and launched the code, without seing the text file openning (like a bckground process).
d:\Users\Yann\Desktop\QW787_Fuel.cfg
The text content is:
[Config]
Units=1
[fuel.0]
LeftMain=36983
RightMain=36983
Center=22818
The values to be replaced are the numbers after:
LeftMain=
RightMain=
Center=
An example of the new values that will be extracted from Excel file are:
Cell D43 value = 5000
Cell D45 value = 5000
Cell D44 value = 600
Expected text file after replacement:
[Config]
Units=1
[fuel.0]
LeftMain=5000
RightMain=5000
Center=600
The values to be replaced are variable (numbers can vary from 0 to 99999).
I do not know much about vba and need your help guys to have a vba code that will be launched from Excel and replace the values in the text file after I change them in excel and launched the code, without seing the text file openning (like a bckground process).