VB6 code - using SHBrowseForFolder API Function - how to prevent access to network folders?

    Question by:
    On

    Topics:

    Hi Experts,

    I am using VB^ code (see article here:  http://www.codeguru.com/vb/controls/vb_shell/article.php/c3051/ ) that uses the SHBrowseForFolder API Function.

    How can I modify that code so that will either:

    a. hide network folders?, OR
    b. prevent access to network folders?

    I already suspect a simple solution is to check for folders that start with "\\", but I am hoping for a more sophisicated solution.

    Regards,
    Leigh
    Good Question?
    0

    Featured Post

    Course: Foundations of Front-End Development

    Jump-start a lucrative career in front-end web development, with zero previous coding experience required. This course covers the basic programming concepts and languages required for creating engaging websites from scratch.

    Top Expert Contributor

    Essential articles and videos from the Experts

    Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
    When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

    More valuable questions with Expert answers

    Question: Hi I have this MSHFLexgrid1 and in column 1, i may have multiple different values including duplicates, and not always sorted. What i would like to do is to build a string in the textbox called Sql_result where it would get 1 record of each...

    Answer: Private Sub cmdCommand1_Click() Dim txt As String Dim iPOS As Single Dim col As New Collection Sql_result = "" Dim s As String Dim j As Long, n As Long On Error Resume Next For n = 1 To MSHFlexGrid1.Rows - 1 If...

    Question: Hello, I have the below statement that I tried 2 different ways. don't know what I have wrong? the first one gives too few parameters and the second says It can't find the table (CODE) This is the debug result for each UPDATE...

    Answer: Try this with quotes: (CODE)/gustav

    Question: Hi, attached i have a list of customer names in Col A - there is a bar in the middle of some of the names - i need some formula/ code to plit the name and stack the second part in the next row - i have shown in the spreadsheet the desired...

    Answer: Try this.... In the attached, click the button "Click Here" to run the code. (CODE)

    Question: I had this question after viewing Data-Updating-VBA-V3 (https://www.experts-exchange.com/questions/28955036/Data-Updating-VBA-V3.html). In attached workbook I have one sheet “LumSum Calculation” where I get rolling return for particular scheme...

    Answer: Try this It runs when you change the value in U1

    201601-LO-Qu-076

    Extend your technology team with the Experts Exchange community.

    — trusted by —

    Who answers my questions?Our community has technology experts around the world.

    Subodh Tiwari (Neeraj)

    728

    Solutions

    Expert in:

    • MS Excel
    • VBA
    • MS Office
    • Visual Basic Classic
    • MS Applications

    Martin Liss

    16

    Articles

    2,254

    Solutions

    Expert in:

    • MS Excel
    • Visual Basic Classic
    • MS Office
    • VB Script
    • VBA

    Ryan Chong

    5,426

    Solutions

    Expert in:

    • Visual Basic Classic
    • ASP
    • MS Access
    • JavaScript
    • ASP.NET

    Robberbaron (robr)

    1,178

    Solutions

    Expert in:

    • MS Excel
    • VB Script
    • Visual Basic Classic
    • .NET Programming
    • ASP.NET

    Ejgil Hedegaard

    431

    Solutions

    Expert in:

    • MS Excel
    • VBA
    • MS Office
    • Spreadsheets
    • VB Script

    chaau

    748

    Solutions

    Expert in:

    • MS SQL Server
    • MS Access
    • MS SQL Server 2008
    • Query Syntax
    • .NET Programming

    Rgonzo1971

    1

    Articles

    2,556

    Solutions

    Expert in:

    • MS Excel
    • MS Office
    • VBA
    • Visual Basic Classic
    • MS Access

    JSRWilson

    7

    Articles

    648

    Solutions

    Expert in:

    • MS PowerPoint
    • MS Office
    • MS Applications
    • MS Excel
    • VB Script

    Qlemo

    8

    Articles

    6,411

    Solutions

    Expert in:

    • MS SQL Server
    • Powershell
    • VPN
    • MS DOS
    • MS SQL Server 2008

    RELATED TOPICS view all topics

    1. MS Excel
      (127,065)
    2. VB Script
      (35,947)
    3. MS Access
      (214,540)
    4. .NET Programming
      (130,877)
    5. Visual Basic.NET
      (91,308)
    6. MS Development-Other
      (47,892)
    7. Programming Languages-Other
      (19,530)
    8. Programming-Other
      (51,578)
    9. MS Office
      (56,483)
    10. MS Word
      (26,703)