Solved

Seperating Directory

Posted on 2014-12-30
13
102 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Excel VBA User Form Help 21 29
And OR formula 5 22
Msgbox tickler 10 25
Excel, covert column titles to row titles and back 2 13
Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

777 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