Solved

Seperating Directory

Posted on 2014-12-30
13
104 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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
 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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 …
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

856 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