Hi guys,
I'm fairly advanced in Excel but still learning, especially when it comes to VBA. I'm working on a large large project & I'm stuck on two issues...
1) My file does thousands of calculations in a loop, creates a LOG file, which we run analysis on & save in our strategy tester before repeating the cycle for the next set of data. I manage to piece together some code to read a title for each individual log from within a cell & then save the log, before continuing with the next cycle.
Code looks like this:
It's not a major problem, but this always saves the logs into "My Documents", rather than the same folder that the parent excel file is running from. I don't want to specify the directory path as it's running on different computers in different locations. Can anyone help with this?
2) My second problem is we originally had a sheet called "Bet analyzer" as part of the main workbook. Because this sheet is now almost 80mb (15000 lines of code), it was slowly the pre-calculations in the rest of the file. I've now separated them so the that the code in the main file calls up the Bet Analayzer only when it needs it & closes it after. The bet analyzer has a built in chart that our code would automatically change the number of lines for, according to the amount of data. Since separating the worksheet I'm getting an error.
The problem line is highlighted & will no longer calculate the rows:
VBA showing error in line:
Anyway, sorry to ask many questions. If anyone can help me I'd be very grateful.
Barry
Bookmarks