Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro in excel to save to an unmapped drive !
Help...
Can anybody hlep me out here... I am trying to construct a macro part of which will save a file to an unmapped drive, i can do this when the filename is static but I need to change the filename cellvalue2 = Sheets("explanations").Range("F1").Text myvalue = cellvalue2 ActiveWorkbook.SaveAs Filename:=myvalue I can also do it when I have a mapped drive by using CHDRIV "E:" but not to an unmapped one ! Can anybody help? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro in excel to save to an unmapped drive !
Maybe....
dim myPath as string dim CellValue2 as string 'point at the UNC path here. myPath = "\\server\folder\folder\" if right(mypath,1) < "\" then mypath = mypath & "\" end if cellvalue2 = Sheets("explanations").Range("F1").Text ActiveWorkbook.SaveAs Filename:=mypath & cellvalue2 wrote: Help... Can anybody hlep me out here... I am trying to construct a macro part of which will save a file to an unmapped drive, i can do this when the filename is static but I need to change the filename cellvalue2 = Sheets("explanations").Range("F1").Text myvalue = cellvalue2 ActiveWorkbook.SaveAs Filename:=myvalue I can also do it when I have a mapped drive by using CHDRIV "E:" but not to an unmapped one ! Can anybody help? -- Dave Peterson |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro in excel to save to an unmapped drive !
Dave...
Works like a dream... Many Thanks Robin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I emulate rightclick on a hyperlink in an Excel Macro | Excel Discussion (Misc queries) | |||
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER | New Users to Excel | |||
EXCEL saving to A: drive | Excel Discussion (Misc queries) | |||
save original data after macro is run again | New Users to Excel | |||
Macro excel save | Excel Discussion (Misc queries) |