Any of you a genius at Excel Macros and Visual Basic??
Any of you a genius at Excel Macros and Visual Basic??
You guys are always my best resource so I figured I would ask here. THis is for my Virtual Dyno Room Simulator.
Macro:
I want to set it up so the user just pushes a 'form' button that opens a window to choose which file they want to extract data from. Once the file is chosen, it then looks for the columns with the following words (LogEntrySeconds,Engine RPM,Timing, and Boost) and copy/pastes the entire column into my spreadsheet in a specific location. If any of you can help the community with this, i will forever be in your debt! Or at least until the end of the month,lol.
Macro:
I want to set it up so the user just pushes a 'form' button that opens a window to choose which file they want to extract data from. Once the file is chosen, it then looks for the columns with the following words (LogEntrySeconds,Engine RPM,Timing, and Boost) and copy/pastes the entire column into my spreadsheet in a specific location. If any of you can help the community with this, i will forever be in your debt! Or at least until the end of the month,lol.
Last edited by Jack_of_Trades; Jun 14, 2010 at 04:06 PM.
While that would be a great idea, it may not be universal. For example, those may be the default names in EvoScan, but for anyone that has changes them or use anything besides EvoScan, it won't work.
I will probably have it filter out only the items logged while at WOT as well like bBarnhill did with his beta version.
Just trying to minimize the copy/pasting burden if possible.
Trending Topics
SO here is a hitlist of what I need to happen basically (forgive my lack of terminology with VB code):
When I click the 'Select BASE PULL Datalog File' button, the attached macro must do the following:
An 'Open File' Dialog Box appears (to choose which .csv datalog file to extract data from)
Before dumping new data into the specified locations in VDR, I want it to 'clear/delete' the old data first to eliminate any data remnants from the old datalog data.
Once selected, it looks for the column with LogEntrySeconds in it.
It then copies that entire column to a specified column in VDR.
After that is built, I just need to make it to the same thing for:
Engine RPM
AFR
Boost
Timing Advance
That's it really.
What I need to do is make the column names the macro searches for in the worksheet (i.e; anything bold in this post) to be referenced from a cell location in VDR. That way I can set it up so the user can modify the column names that the macro looks up (ie; MyWidebandSignal,1-Byte RPM Mod,etc...).
From my understanding, this can be done without the actual datalog file (workbook) ever being opened in Excel.
When I click the 'Select BASE PULL Datalog File' button, the attached macro must do the following:
An 'Open File' Dialog Box appears (to choose which .csv datalog file to extract data from)
Before dumping new data into the specified locations in VDR, I want it to 'clear/delete' the old data first to eliminate any data remnants from the old datalog data.
Once selected, it looks for the column with LogEntrySeconds in it.
It then copies that entire column to a specified column in VDR.
After that is built, I just need to make it to the same thing for:
Engine RPM
AFR
Boost
Timing Advance
That's it really.
What I need to do is make the column names the macro searches for in the worksheet (i.e; anything bold in this post) to be referenced from a cell location in VDR. That way I can set it up so the user can modify the column names that the macro looks up (ie; MyWidebandSignal,1-Byte RPM Mod,etc...).
From my understanding, this can be done without the actual datalog file (workbook) ever being opened in Excel.
Last edited by Jack_of_Trades; Jun 17, 2010 at 03:27 PM.
EvoM Guru
iTrader: (50)
Joined: Mar 2006
Posts: 9,675
Likes: 132
From: Tri-Cities, WA // Portland, OR
VBA has to open the datalog for Excel to be able to read it. It then has to be closed afterwards. If screen updating is disabled (via VBA command is in the macro I sent to you), then the end user will never see any of this.
MrFred, your macro was insane for me to try and figure out, plus it didnt work on a PC at all 
This is a good starting point for guys more knowledgeable in this language than me. There is a link on this page that I got to work but IDK how to manipulate it for my specific needs.
http://www.ozgrid.com/forum/showthread.php?t=67714
Here is another:
http://www.ozgrid.com/forum/showthread.php?t=17158
.

This is a good starting point for guys more knowledgeable in this language than me. There is a link on this page that I got to work but IDK how to manipulate it for my specific needs.
http://www.ozgrid.com/forum/showthread.php?t=67714
Here is another:
http://www.ozgrid.com/forum/showthread.php?t=17158
.
Last edited by Jack_of_Trades; Jun 17, 2010 at 04:38 PM.
EvoM Guru
iTrader: (50)
Joined: Mar 2006
Posts: 9,675
Likes: 132
From: Tri-Cities, WA // Portland, OR
Too bad it didn't work at all. Are you still jonesing for some code to open a log file, parse the log file, and then close the log file? If yes, I will see what I can do this weekend to make the code work on a PC.
eXtreme-Speed is supposedly gonna have some Macro code tossed together for me tomorrow. If he hits a snag, maybe I can have you guys start posting the code in this thread so all of you brainiac's can get this **** working for me lol. Next will be an .exe version of VDR if I can wrap my head around whats involved. For free....people can live with the Excel requirement at this time lol.
Last edited by Jack_of_Trades; Jun 17, 2010 at 10:26 PM.






