Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default Macro in excel to save to an unmapped drive !

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

Robin

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I emulate rightclick on a hyperlink in an Excel Macro Emulate RightClick on Hyperlink in Macro Excel Discussion (Misc queries) 0 January 2nd 06 09:40 AM
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER MEGTOM New Users to Excel 5 October 27th 05 03:06 AM
EXCEL saving to A: drive LindaD Excel Discussion (Misc queries) 2 October 10th 05 11:53 PM
save original data after macro is run again MINAL ZUNKE New Users to Excel 3 July 7th 05 12:48 PM
Macro excel save mrbalaje Excel Discussion (Misc queries) 1 May 12th 05 06:27 PM


All times are GMT +1. The time now is 12:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"