?
Solved

Seperating Directory

Posted on 2014-12-30
13
Medium Priority
?
110 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:Naresh Patel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
  • 3
13 Comments
 
LVL 28

Assisted Solution

by:omgang
omgang earned 200 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 200 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 31

Accepted Solution

by:
gowflow earned 1800 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:Naresh Patel
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:Naresh Patel
ID: 40525121
Sir. Gowflow,

your attached workbook working perfect.

Thanks
0
 
LVL 8

Author Closing Comment

by:Naresh Patel
ID: 40525124
Awsome
0
 
LVL 31

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:Naresh Patel
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 31

Expert Comment

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

Author Comment

by:Naresh Patel
ID: 40528290
May I ask Same concept question?
0
 
LVL 31

Expert Comment

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

Author Comment

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

Thanks
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

764 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