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?

0
robinraw (4)
1/18/2006 11:32:20 AM
excel.misc 78881 articles. 5 followers. Follow

2 Replies
1318 Views

Similar Articles

[PageSpeed] 30

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

robinraw@hotmail.com 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
0
petersod (12004)
1/18/2006 3:29:38 PM
Dave...
Works like a dream...
Many Thanks

Robin

0
robinraw (4)
1/19/2006 10:00:52 AM
Reply:

Similar Artilces:

need help with an excel spreadsheet
I have an excel spreadsheet where questions are answered in one area, and the answers show up on a form in another area of the sheet that gets printed. Instead of printing, how can I either email the print area or have just the print area saved as a file? And, with a macro, can the new file be named automatically by what's in a particular cell? Thanks, Russ You don't say whether the recipient would need to edit the data. If not, there are numerous programs available (free, shareware and commercial) which enable print output to be stored as a PDF file. Another option would be to c...

Macro warning with no macros
I have a workbook that when I try to open it I get the warning tellin me it contains macros and asking whether I want to Enable or Disabl them. I put no macros, no VB scripts, nothing at all in the workboo other than standard Excel formulas and some charts. I developed it i Excel 2002, SP-2, but have moved it back and forth between tw computers, the other which has Excel 97. Regardless of whether Enable or Disable or change the security settings so as not to get th warning, once the workbook is open even if I go t Tools-Macro-Macros... it lists no macros. How can I find out what's cau...

saving the history of recently used excel documentsto another comp
Reimaging a computer and wanting to know if I can export the excel history to the new image. Most files are on the network and not sure where they are, don't want to remap them all If you're referring to the files listed at the bottom of the File menu you'd have to run the Regedit program and go to this key: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel\Recent Files replacing the "11.0" with your Excel version if different. Then you would have to right click on the Recent Files folder and Export it. After the reimage you would double-click the resultin...

when inserting a chart excel is saying i cannot add any new fonts
When I attempt to insert a chart i am getting a message which says,"no new fonts may be added to this workbook". I am adding it to a billing process and I did the first 100 or so before it began this doing this, I am not adding any new fonts but I am getting this message, any suggestions on what is the cause so I can overcome it? I've described the problem and fix here: Error: "No more new fonts may be applied in this workbook" http://peltiertech.com/Excel/Charts/FixFonts.html - Jon ------- Jon Peltier Peltier Technical Services, Inc. http://peltier...

Macro
Can anybody tell me how to kick off a macro automatically as file is opened? Regards ...

Macro
Version: 2008 Operating System: Mac OS X 10.4 (Tiger) Processor: intel Hi, I'm thinking of buying Mac: Office 2008, but before I do I want to check that I will be able to download Scritpsmart collection of templates without any glitches: <http://www.bbc.co.uk/writersroom/scriptsmart/faq.shtml> Does anyone know if I can do this? Regards, SP. In article <ee98ff5.-1@webcrossing.caR9absDaxw>, StregaItalia@officeformac.com wrote: > Version: 2008 > Operating System: Mac OS X 10.4 (Tiger) > Processor: intel > > Hi, > > I'm thinking of buying Mac: Of...

Drive Configuration for Exchange 2003
I currently have exchange 2003 installed on a windows 2003 server. Exchange is installed on the c: drive which is a 40gb drive. We are in the earlt implementation stages of exchange, there are no mailboxes set up, no public folders, its is basically just a clean install of exchange at the moment. We also have a d: drive which is 200gb, i want to put all the mailboxes and all the public stores on the d: drive as a fear that the 40gb drive will fill up quite quickly once we start using exchange fully. How can i change the mailbox and public store, and anything else that will take up a...

Excel separator pages
When printing multiple copies of a spreadsheet if it is set to collate I get multiple separator pages 1 for each copy, if I turn off the collate option, I only get 1 separator page. Can this be adjusted in any way so I don't get multiple separator pages even when I use the default collate option?? ...

Run macro automatically.
How do I make a macro run automatically when a worksheet it is attached to is loaded? right click on the sheet tab>view code>left window worksheet>right window activate -- Don Guillett SalesAid Software donaldb@281.com "Excel macro" <Excel macro@discussions.microsoft.com> wrote in message news:DD7AF1E3-9263-4523-AC49-A43ABA1AB9D0@microsoft.com... > How do I make a macro run automatically when a worksheet it is attached to is > loaded? I am unable to find "activate " when I right click on worksheet. ( i assume that you are referring to the windo...

Help with macro/and or formula?
Perhaps this is a silly question, but i just can't figure out how t format this worksheet. The problem is that a lot of the cells hav numbers in them with negative signs in the back instead of in the fron (ie. 23-) and i was wondering if anyone knew of a macro/formula i coul use to quickly fix this problem for all the cells. I would b extremely grateful. Thanks -- brefed1 ----------------------------------------------------------------------- brefed15's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=3557 View this thread: http://www.excelforum.com/showthre...

Attached Toolbars Macros
Excel 2003 I have a custom tool bar, this tool bar has several items, each item is pointing to a VBA code. This tool bar is attached to the worksheet. I've copied this spreadsheet to several computers. After I copied the spreadsheet I decided to rename the spreadsheet, after I renamed the spreadsheet the Toolbar Item's macros were still pointing to the old name, I reasigned each tool bar item to the current spreadsheet, saved the spreadsheet and everything was working on my computer, but when I re-copied the new spreadsheet to other computers and I clicked on the Toolbar Item...

Protected sheets and running macros
i have a sheet with a macro ran by a normal button at the top. Howeve when i protect the worksheet where ever i click on the sheet the macr executes. Can any one offer any advice on how to stop this? Thanks Robert -- Message posted from http://www.ExcelForum.com hi, i am not able to reproduce the problem, hence i may not be able t provide a panacea for that issue. here is what i suggest. i have a sheet that has a macro that is run when a control toolbo button (that is, not a form button) is clicked. this sheet is protected based on the user logged in. what i have don is to protect t...

Saving in 2003 Excel
I am currently taking Excel 2002 in college. The software I have loaded is 2003 but my Professor is running 2002. Can someone tell me how ot save in 2003 so the Professor can read in 2002? Hi Terry! Just save normally. You version challenged Professor will be able to open it. -- Regards Norman Harker MVP (Excel) Sydney, Australia njharker@optusnet.com.au Excel and Word Function Lists (Classifications, Syntax and Arguments) available free to good homes. Same file format, no problems.. -- Regards, Peo Sjoblom "Terry" <our.email@fuse.net> wrote in message news:384d...

Macro Freezes Reading Pane
I have a macro that Sends/Receives Tasks from Project Server into Outlook Tasks. Everything is working fine, except one weird thing that happens. I have the Timer set on the macro and it starts as soon as Outlook starts. The macro gets the tasks from ProjectServer every hour. As soon as the macro starts running the Reading pane freezes in the Inbox. If i stop the macro then Reading pane is back to normal. Can anyone please tell me if there is something I can do in VBA to fix this annoying issue. Thanks a lot ...

Macro to remove rows?
Hi, I receive thousands of rows of data from an extract that comes from a database. The data extract automatically generates page headers that need to be removed, and I would love to automate this process. The headers do have a pattern to them, but I'm not clever enough to figure out a good way to use that to write a macro. The first row of the header starts with hyphens ------------------------------- Then there's a variable number of rows of header data to delete followed by another row of hyphens ------------------------------- Then 2 additional rows that must be deleted. The nu...

Calling on a macro within a macro!
Hey All!! Quick Question - How do you call up a macro within a current macro? I have one big macro and I need it to jump to several other macros when it runs! Does it matter where the other macros are stored or is it better to have them all in one module? Help appreciated Thnx! Hi Mellowe, '=============>> Public Sub Main() 'Your code Call One 'your code End Sub '<<============= '=============>> Public Sub One() MsgBox "Hi from One" End Sub '<<============= > Does it matter where the other macros are stored or ...

How do I create a "dartboard" chart in Excel?
How do I create a chart that looks like a dartboard, i.e. it works like a radar chart, but is round and with the ability to colour different "rings" to represent different bands of scores? Try a Donut chart. This will give you the rings, and you can make 20 segments in each ring to build up the wedges. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Simon Davis" <Simon Davis@discussions.microsoft.com> wrote in message news:779E3583-AD32-48B1-BAA8-D1C072CEC36F@microsoft.com... > How do I create a ...

Excel as Attendance Tracker
Merry Christmas Everyone!! I've posted this on another board - got lots of views but no responses so I'm hoping Santa will be good to me and someone reading this thread will have an answer. We have 100+ employees. We need to track PTO, Vacation in hours and then also log other instances of time away from work (f= fmla, t=travel, c=comp time, h=work at home). However these "other instances" do not need to be tracked in terms of hours used. The only suggestion that came on the other board was to have 3 rows per employee - not a good solution. My solution so far has been t...

Save as .exe file
I've developed a program using Microsoft Excel 2003 with Visual Basic Editor. How can I save the program as .exe file so that a user doesn't have to open Microsoft Excel and VBE to execute the program? Any ideas? Thank you soo much I don't think your problem is as complicated as it seems, but I can't tell. You need to better explain what this program is supposed to do, and what you expect the user to do to initiate the running of the program. rixanna wrote: > I've developed a program using Microsoft Excel 2003 with Visual Basic > Editor. > How can I save th...

Trend Line constants as Excel Cell Values
I want to put the constants of a 2 degree polynomial trend line into Excel Cells. Are there formula's to do this? Equation is Y = Ax(2) + Bx + C. I want the value of A,B and C in seperate cells. Can anyone suggest how this can be done? Thanks -- Ken Hi Ken, Supposing your x-range is in A2:A10, and y-range in B2:B10, select a 3-column x 1-row area and enter the following formula and confirm with CTRL-SHIFT-ENTER. =LINEST(B2:B10,A2:A10^{0,1,2},0,) Regards, B. R. Ramachandran "Ken" wrote: > I want to put the constants of a 2 degree polynomial trend line into Excel &g...

shortcut keys to macros
Hi, Is it at all possible to assign shortcut keys to macros in Outlook? Thx, Hans ...

Retain Field Format From Excel
I have an excel file that I'm importing to Access. This field consists of "time"...hours, minutes, seconds. The format in excel is set to "Custom" - [h]:mm:ss. The data elements look like 150:27:50, 2:30:25, etc... The time stays the same for some records but others change. For example...150:27:50 becomes 6:27:50 AM when imported. If someone can help me figure a way to retain the format for all records I would greatly appreciate it. Thank You, Lisa W. 150 divided by 24 = 6.25 or 6 and 1/4 days which is displayed a 6 AM. You need to use a ...

help Unable to record Macro !!!!!!!
I want to record a macro in excel.But as soon as I click record Macro it says "unable to record" macro. Got no help in excel help.I do this same thing in word and it's working. Please help It's urgent for me !!!1 Have a look here http://groups.google.com/groups?as_epq=unable%20to%20record&as_ugroup=microsoft.public.excel.* -- Don Guillett SalesAid Software donaldb@281.com "ash" <anonymous@discussions.microsoft.com> wrote in message news:3e0b01c42ae5$45333e00$a401280a@phx.gbl... > I want to record a macro in excel.But as soon as I click > record...

Macro that password protects a sheet
I am attempting to create a macro that can open a protected sheet, change something, and then protect it again. I continue to have an issue with the macro not entering the password. Is this possible to do/fix? Thanks, Ryan ..open password="mypassword" -- Don Guillett SalesAid Software donaldb@281.com "Ryan" <Ryan@discussions.microsoft.com> wrote in message news:D4780ED8-CA1D-4284-97BC-3576160D998E@microsoft.com... > I am attempting to create a macro that can open a protected sheet, change > something, and then protect it again. I continue to have an iss...

Footer Macro?
Hi Months ago I read a Public Sub Macro that read the selection of a drop down list in a combo box and placed it in the center Footer at the same time it also placed the date in the right Footer and tme in the left footer. I have searched most of the regular sites including this one and cannot find it anywhere --- Can anyone help with my search. Any help much appreciated Cheers ---- Mully ...