![]() |
Save file to Network Drive and prompt for name
I am having trouble writing a macro that when ran it will save my file
into a network location and prompt me for the file name. The network path will always be the same place but the file name will change. Any help would be great. thanks, KO |
Save file to Network Drive and prompt for name
KO,
Maybe you could incorporate the current time into the filename to make it unique? Rob "turtle" wrote in message om... I am having trouble writing a macro that when ran it will save my file into a network location and prompt me for the file name. The network path will always be the same place but the file name will change. Any help would be great. thanks, KO |
Save file to Network Drive and prompt for name
You could use
ActiveWorkbook.saveas("c:\direcory\" & inputbox("File Name ?")) This will just pop up a simple box to type in your file name and will save it to the c drive in the folder you choose. "Rob van Gelder" wrote in message ... KO, Maybe you could incorporate the current time into the filename to make it unique? Rob "turtle" wrote in message om... I am having trouble writing a macro that when ran it will save my file into a network location and prompt me for the file name. The network path will always be the same place but the file name will change. Any help would be great. thanks, KO |
Save file to Network Drive and prompt for name
Dim sFile As String
sFile$ = Application.GetSaveAsFilename() If sFile = False Then Exit Sub End If If InStr(1, sFile, ".xls") = 0 Then sFile = sFile & ".xls" End If ActiveWorkbook.SaveAs (sFile) --- Message posted from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 12:35 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com