ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   network location (https://www.excelbanter.com/excel-programming/376933-network-location.html)

bernd

network location
 
In a piece of Visual Basic code my programme needs to read from a
textfile. The programme points to the pad of the textfile like this:

pad$ = Application.DefaultFilePath

In a new situation I want the location to be in a shared folder on
another pc in the network. How do I solve this? I get errors when
using:

pad$ = \\location\folder

and

pad$ = \\ip-adres\folder

I don't want to change the default file path.

thanks.

Bernd


Dave Peterson

network location
 
You have to surround strings with double quotes, like:

pad$ = "\\location\folder"



bernd wrote:

In a piece of Visual Basic code my programme needs to read from a
textfile. The programme points to the pad of the textfile like this:

pad$ = Application.DefaultFilePath

In a new situation I want the location to be in a shared folder on
another pc in the network. How do I solve this? I get errors when
using:

pad$ = \\location\folder

and

pad$ = \\ip-adres\folder

I don't want to change the default file path.

thanks.

Bernd


--

Dave Peterson


All times are GMT +1. The time now is 09:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com