ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Write Worksheet To Network Directory (https://www.excelbanter.com/excel-programming/398923-write-worksheet-network-directory.html)

Joe K.

Write Worksheet To Network Directory
 

I would like to output Sheet1 worksheet contents to a CSV file format to a
certain network directory listed below. I would like the file name to be in
the format listed below.

Network directory: F:\Marketing\June07
File Name Format : LINKSYS_YYMMDDHH Today
Today's File Name: LINKSYS_07100816

Please help me complete this task.

Thanks,

JW[_2_]

Write Worksheet To Network Directory
 
On Oct 8, 5:15 pm, Joe K. <Joe wrote:
I would like to output Sheet1 worksheet contents to a CSV file format to a
certain network directory listed below. I would like the file name to be in
the format listed below.

Network directory: F:\Marketing\June07
File Name Format : LINKSYS_YYMMDDHH Today
Today's File Name: LINKSYS_07100816

Please help me complete this task.

Thanks,


Sub tester()
Dim networkDirectory As String
Dim fName As String
networkDirectory = "F:\Marketing\June07\"
fName = "LINKSYS_" & Format(Now(), "yymmddhh")
ActiveSheet.SaveAs networkDirectory & fName, xlCSV
End Sub



All times are GMT +1. The time now is 04:20 PM.

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