Solved

Seperating Directory

Posted on 2014-12-30
13
99 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Outlook Free & Paid Tools
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

932 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

11 Experts available now in Live!

Get 1:1 Help Now