Solved

Code Modification

Posted on 2016-08-27
6
37 Views
Last Modified: 2016-08-28
I had this question after viewing RT - Data.

Hi Experts,

i need little modification in existing code.please help me out.
in attached WB Sheet main - Button Start Process - it will download zip files from server - unzip - post entries to respected file.it download data for duration between date - Cell G3 & Cell H3. after process completed in cell G3 date is change to last downloaded file date plus 1.

Need  modification
A) Change in download path i.e. fix download path in code it self instead of selecting in main sheet....path is D:\RTTrading\Data\
B) current process download data and past last date+1 in cell G3...so on next day if i click Start process button - it will delete all file and download new files and post to respective sheet .....but problem arise there ....i see only one entry in respected sheets ...i required macro dont delete old entries in respective sheet and post only new entries and limit entries to 30 row data (header is so in real term last data line is row 31).

See attached

Thanks
Sample.xlsm
0
Comment
Question by:itjockey
  • 3
  • 2
6 Comments
 
LVL 26

Expert Comment

by:MacroShadow
ID: 41773490
A) Change in download path i.e. fix download path in code it self instead of selecting in main sheet....path is D:\RTTrading\Data\

Open in new window

In sheet Main replace this:
gstDestinationFolder = GetNewFolder(gstDestinationFolder, "Destination Folder")

Open in new window

with this:
gstDestinationFolder = GetNewFolder("D:\RTTrading\Data\", "Destination Folder")

Open in new window


.....but problem arise there ....i see only one entry in respected sheets ...i required macro dont delete old entries in respective sheet and post only new entries and limit entries to 30 row data (header is so in real term last data line is row 31).
I don't understand.
0
 
LVL 8

Author Comment

by:itjockey
ID: 41773689
0
 
LVL 21

Accepted Solution

by:
Ejgil Hedegaard earned 500 total points
ID: 41773892
The original workbook had the start date = today - 45.
That creates the required zip and csv files for all 30 entries.
Then the csv update use the most recent 30 files, also if you miss a daily update.

If the macro does not change the start date, it works.
See sample file where start date change in macro removed.
Fixed folder D:\RTTrading\Data\
Screen updating turned off.
Added a Status form to show the progress.

This was much easier to change than write a new process for the csv update, and I think it is better to do a complete update.
It only runs about a minute.
Sample.xlsm
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 8

Author Comment

by:itjockey
ID: 41773908
ok no worries ...i thought if we required daily one file to update all sheets or say if i dint done process for 2 days then ...previous method will start download from that date  were we left ,,,so only 2 files download and update sheets accordingly.

just waiting  for  your view point ....after that i will close this question.

Thanks
0
 
LVL 21

Expert Comment

by:Ejgil Hedegaard
ID: 41773973
It is more complicated to check and adjust sheets to a random number of updates, than just update all.
That, and because the update time is not very long, is why I kept the original solution to update all.
0
 
LVL 8

Author Closing Comment

by:itjockey
ID: 41774279
Thanks
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Modern/Metro styled message box and input box that directly can replace MsgBox() and InputBox()in Microsoft Access 2013 and later. Also included is a preconfigured error box to be used in error handling.
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
This video discusses moving either the default database or any database to a new volume.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now