Solved

Need dialog box to set path in program

Posted on 2015-01-11
2
74 Views
Last Modified: 2015-01-12
I have three forms in the attached project named frmallowed.frm and frmblocked.frm and BlockList.frm   Essentially these forms access files to populate an MSFlexGrid.  Two forms are identical except for the file and folder locations they access.   I need a dialog box to set the location of all three of these forms.  I was thinking that in the menu, I could set these 3 path locations in a separate text file called paths.txt and then the program would be set.

In frmallowed.frm I need a dialog box that will set the location for the allowed.txt file.  I have comments by the needed line.

In frmblocked.frm I need a dialog box that will set the location for the blocked-custom.txt file   I have comments by the needed line.

In BlockList.frm I need a dialog box that will set the location for the DailyLogs folder    I have comments by the needed line.

How can I setup a dialog box as an example?
CB.zip
0
Comment
Question by:al4629740
  • 2
2 Comments
 
LVL 46

Expert Comment

by:Martin Liss
ID: 40543670
Let me take a look.
0
 
LVL 46

Accepted Solution

by:
Martin Liss earned 500 total points
ID: 40543675
Add a Microsoft Common Dialog control toe the form and then do something like this.

CommonDialog1.DialogTitle = "Open File"
CommonDialog1.Filter = "*.*"
CommonDialog1.FilterIndex = 1
CommonDialog1.Flags = cdlOFNAllowMultiselect + cdlOFNExplorer
CommonDialog1.Flags = cdlOFNFileMustExist + cdlOFNHideReadOnly
CommonDialog1.CancelError = True
On Error Resume Next
CommonDialog1.ShowOpen

Open in new window

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

828 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