ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Transfer files & change file attributes with VBA ? (https://www.excelbanter.com/excel-programming/420543-transfer-files-change-file-attributes-vba.html)

Bassman62

Transfer files & change file attributes with VBA ?
 
Using Excel 2007 / WinXP
The tasks at hand:
Use FTP to transfer a text file from a Unix Server to a Windows Server.
Remove "Read-only" attribute from "Job_Report.xls"
Open "Job_Report.xls"

*In "Job_Report.xls", Refresh a text import (from the text file just moved)
*For this part I have code that unprotects the sheet, refreshes the connection
then protects the sheet. The code is in a code module in "Job_Report.xls".

Close "Job_Report.xls" and set the "Read-only" attribute.

Is there a way to control the FTP program or access the file via another
method?
Can I set file attributes with VBA? How?
Many thanks.

Dave


galimi

Transfer files & change file attributes with VBA ?
 
Dave,

I believe you can change file attributes using the file system object.
--
http://www.ExcelHelp.us

888-MY-ETHER ext. 01781474



"Bassman62" wrote:

Using Excel 2007 / WinXP
The tasks at hand:
Use FTP to transfer a text file from a Unix Server to a Windows Server.
Remove "Read-only" attribute from "Job_Report.xls"
Open "Job_Report.xls"

*In "Job_Report.xls", Refresh a text import (from the text file just moved)
*For this part I have code that unprotects the sheet, refreshes the connection
then protects the sheet. The code is in a code module in "Job_Report.xls".

Close "Job_Report.xls" and set the "Read-only" attribute.

Is there a way to control the FTP program or access the file via another
method?
Can I set file attributes with VBA? How?
Many thanks.

Dave



All times are GMT +1. The time now is 12:41 PM.

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