Solved

Seperating Directory

Posted on 2014-12-30
13
97 Views
Last Modified: 2015-01-02
Hi Experts,

I have one WB which have Two buttons I.e. Equity & Delivery.
both Downloads files from web & save in "D:\AmiBroker Data\NSE\Eq". need to separate location for both the process. for equity I need "D:\AmiBroker Data\NSE\Eq" location & for delivery I need "D:\AmiBroker Data\NSE\Del" this location.

see attached file

Thanks
Grouped-V01.xlsm
0
Comment
Question by:itjockey
  • 6
  • 4
  • 3
13 Comments
 
LVL 28

Assisted Solution

by:omgang
omgang earned 50 total points
ID: 40524566
Without actually testing, I believe this will do the trick.  I added the code in Bold
OM Gang

Private Sub CommandButton21_Click()
       'change delivery directory
    gstDestinationFolder = "D:\AmiBroker Data\NSE\Del\"

    StartDel
End Sub
0
 
LVL 28

Assisted Solution

by:omgang
omgang earned 50 total points
ID: 40524644
You'd need to also specify the directory for Equity as well in case Delivery was run first.  I added the code in Bold
OM Gang

Private Sub CommandButton2_Click()
Dim sResults As String

If CommandButton1.Caption = "Browse" Then
    MsgBox "Warning !!! You cannot start this process without having selected a folder to process.", vbCritical, "Delete Rows"
Else
       'specify download directory
    gstDestinationFolder = "D:\AmiBroker Data\NSE\Eq\"


etc.
etc.
0
 
LVL 28

Expert Comment

by:omgang
ID: 40524649
The first change goes into the procedure for the Start Delivery button (CommandButton21).  The second change goes into the procedure for the Start Equity button (CommandButton2).
OM Gang
0
 
LVL 29

Accepted Solution

by:
gowflow earned 450 total points
ID: 40524708
Here is my proposed solution.

I created an other button for delivery and renamed the first one to Equity so you can have the liberty to choose any folder you like for each routine. I also created 2 variables
gstDestinationFolderDel
gstDestinationFolderEqu

replacing the unique
gstDestinationFolder

to allow routing correctly for each section.

Although OM Gang could be a quick fix but it is not a long lasting viable solution as if you need to take advantage of selecting folders for destinations as it is already designed you are not able in the solution proposed as only have 1 source to select folder from which is not attributed to either Equ or Del and routing will always be forced to the preset directories which is not recommended when solution is proposed to non programmers.

Regards
gowflow
Grouped-V02.xlsm
0
 
LVL 8

Author Comment

by:itjockey
ID: 40525119
Mr.Omgang,

I appreciate your solution but I am not too much familiar with VBA Coding & this WB is having to much modules.so I cant able to do  in code sections as you suggested.

but still logically it looks working fine.

Thanks
0
 
LVL 8

Author Comment

by:itjockey
ID: 40525121
Sir. Gowflow,

your attached workbook working perfect.

Thanks
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 8

Author Closing Comment

by:itjockey
ID: 40525124
Awsome
0
 
LVL 29

Expert Comment

by:gowflow
ID: 40525136
Tks appreciated. Any other help needed pls do not hesitate to let me know.
Happy new year 2015 and all best wishes.

gowflow
0
 
LVL 8

Author Comment

by:itjockey
ID: 40525371
Happy New YearSure Sir. I will let you know. from 1 jan 2015 onwards I will back to my prominent business i.e. trading. Working on System on excel which guide me to high probability winning ratio trade. So need more help  for code that idea :).....Cheers


Thank You
0
 
LVL 29

Expert Comment

by:gowflow
ID: 40525540
new year
Cheers to you and nice developing for you !!!
gowflow
0
 
LVL 8

Author Comment

by:itjockey
ID: 40528290
May I ask Same concept question?
0
 
LVL 29

Expert Comment

by:gowflow
ID: 40528508
yes sure sorry for delay.
gowflow
0
 
LVL 8

Author Comment

by:itjockey
ID: 40528525
Here it is "Downloading Index files".

Thanks
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

746 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

14 Experts available now in Live!

Get 1:1 Help Now