close

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(quot;explanationsquot;).Range(quot;F1quot;).Text
myvalue = cellvalue2
ActiveWorkbook.SaveAs Filename:=myvalueI can also do it when I have a mapped drive by using CHDRIV quot;E:quot;

but not to an unmapped one !Can anybody help?Maybe....

dim myPath as string
dim CellValue2 as string

'point at the UNC path here.
myPath = quot;\\server\folder\folder\quot;
if right(mypath,1) lt;gt; quot;\quot; then
mypath = mypath amp; quot;\quot;
end if

cellvalue2 = Sheets(quot;explanationsquot;).Range(quot;F1quot;).Text
ActiveWorkbook.SaveAs Filename:=mypath amp; cellvalue2
wrote:
gt;
gt; Help...
gt; Can anybody hlep me out here... I am trying to construct a macro part
gt; of which will save a file to an unmapped drive, i can do this when the
gt; filename is static but I need to change the filename
gt; cellvalue2 = Sheets(quot;explanationsquot;).Range(quot;F1quot;).Text
gt; myvalue = cellvalue2
gt; ActiveWorkbook.SaveAs Filename:=myvalue
gt;
gt; I can also do it when I have a mapped drive by using CHDRIV quot;E:quot;
gt;
gt; but not to an unmapped one !
gt;
gt; Can anybody help?

--

Dave Peterson

Dave...
Works like a dream...
Many Thanks

Robin

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()