Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save or SaveAs Macro
I have several files on Co Network and would like to build a Macro (behind a button) that would auto assign file name (using workbook cell reference - one identify name and second cell date) and when button is pressed it would perform save or saveas function re-directing that file to a specific network directory. I have tried several combinations with both save and saveas but in save it will not allow me to reference cell's from which i woulod like to enter name and with saveas function it allows me to assign name but it will not recognize network address where i would like to save the file. Also, with saveas function it closes original file and opens saved as file and I'm trying to have user stay in original file that was open. Any help will be greatly appreciated Thanks Arthur -- knosalaa ------------------------------------------------------------------------ knosalaa's Profile: http://www.excelforum.com/member.php...o&userid=32204 View this thread: http://www.excelforum.com/showthread...hreadid=519534 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save or SaveAs Macro
Arthur
You can use the SaveCopyAs method if you want to save a copy of the file and leave the original open and in its same location. If you can't get SaveAs to recognize the network address, you won't have better luck with SaveCopyAs. Likely, you have a typo in your path and it points to a directory that doesn't exist. You may also be missing a backslash somewhere in there. If you can't figure it out, post the code and the error message you're getting. -- Dick Kusleika MVP-Excel www.dailydoseofexcel.com knosalaa wrote: I have several files on Co Network and would like to build a Macro (behind a button) that would auto assign file name (using workbook cell reference - one identify name and second cell date) and when button is pressed it would perform save or saveas function re-directing that file to a specific network directory. I have tried several combinations with both save and saveas but in save it will not allow me to reference cell's from which i woulod like to enter name and with saveas function it allows me to assign name but it will not recognize network address where i would like to save the file. Also, with saveas function it closes original file and opens saved as file and I'm trying to have user stay in original file that was open. Any help will be greatly appreciated Thanks Arthur |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save or SaveAs Macro
I don't have working code as i have tried many options. If my memory serves me right sub filesave () filename=range("8-dir'!d4") Workbook.SaveAs filename="W:\Corp...\subdir\filename & format(Now) mmmyyyy) & "(.xls)" end sub as you can see filename only have one cell reference and i need two where second has date format in different worksheet. thanks for your quick responce Arthur -- knosalaa ------------------------------------------------------------------------ knosalaa's Profile: http://www.excelforum.com/member.php...o&userid=32204 View this thread: http://www.excelforum.com/showthread...hreadid=519534 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Disabling SaveAs and Save? | Excel Discussion (Misc queries) | |||
SaveAs Maceo - Specify Folder it Autoselects to Save In | Excel Programming | |||
Run Macro If Save Is Canceled On SaveAs Window In VBA | Excel Programming | |||
Run Macro If Save Is Canceled On SaveAs Window In VBA | Excel Programming | |||
Detecting Save vs SaveAs in BeforeSave | Excel Programming |