Forum

Open folders on a n...
 
Notifications
Clear all

Open folders on a network using VBA

7 Posts
3 Users
0 Reactions
646 Views
(@maddunkin)
Posts: 8
Active Member
Topic starter
 

I created a button that I want to use to open a folder that is located in a network. Here is the code that I am using:

 

ActiveWorkbook.FollowHyperlink Address:="\bradford#helixFSRSWarehouseWarehouseWarehouseEquipment_by_Platform"

When I click on the button, it is only opening the first folder listed in the path. What do I have to do to get it to open the last sub folder in the address?

 

V/R

Michael

 
Posted : 01/09/2022 9:37 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Michael,

It doesn't like the # in the folder name.  It's not advised to use characters like # in file or folder names, can you change it?

Regards

Phil

 
Posted : 05/09/2022 1:40 am
(@maddunkin)
Posts: 8
Active Member
Topic starter
 

Hey Phil, 

Unfortunately I can't. The file is controlled by our IT department and they don't allow us to make changes to certain folders.

 

 V/R

Michael 

 
Posted : 07/09/2022 12:14 pm
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Michael,

Your IT Dept really should know better than to use characters like # in folder names.  Can you ask them to change it?

Or, can you map a drive (e.g. D:) to \bradford#helix then your VBA would only need to open D:FSRSWarehouseWarehouseWarehouseEquipment_by_Platform

Incidentally, why are there 3 folders all called Warehouse???

Regards

Phil

 
Posted : 07/09/2022 8:56 pm
(@catalinb)
Posts: 1937
Member Admin
 

Can you try:

ActiveWorkbook.FollowHyperlink Address:= Application.WorksheetFunction.EncodeURL("\bradford#helixFSRSWarehouseWarehouseWarehouseEquipment_by_Platform")

Or:

ActiveWorkbook.FollowHyperlink Address:= Replace("\bradford#helixFSRSWarehouseWarehouseWarehouseEquipment_by_Platform","#","%23")

 
Posted : 07/09/2022 11:53 pm
(@maddunkin)
Posts: 8
Active Member
Topic starter
 

Phil, 

Our IT department is in another state and are very hard to work with. The gentleman that we have onsite will do very little for you and moves at a snails pace when it comes to getting anything done. The reason I have so many folders that say "warehouse", is because I started this project on my computer and once I was at a point I was ready to start consolidating and assigning links to folders, I moved it on to the network, I buried it under a few folders to keep others out of it, until I am ready to let it go live.

 

V/R

Michael

 
Posted : 08/09/2022 8:18 am
(@maddunkin)
Posts: 8
Active Member
Topic starter
 

Catalin, 

Thank  you very much!! I tried the first line of code and it worked!! 

 

V/R

Michael

 
Posted : 08/09/2022 8:20 am
Share: