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
2289 Views

Similar Articles

[PageSpeed] 58

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 (12005)
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:

office 2004 x iMac don't save in windows servers
after the upgrade of mac OS X from 10.5.8 to 10.6.1, office 2008 x mac (word, excel and powerpoint) don't create/save/modify files stored in a windows server. if I try with other programs (not office) it works. if I create/save/modify in a local disk on the iMac and then I copy in te server share it works. solutions? Andrea wrote: > after the upgrade of mac OS X from 10.5.8 to 10.6.1, office 2008 x mac (word, > excel and powerpoint) don't create/save/modify files stored in a windows > server. > if I try with other programs (not office) it works. > if I create/save/...

Excel 2007 not refreshing screen
I am running Office 2007 Pro Plus on Server 2003 R2 with terminal Services. When users are using excel, after a few hours they will get black areas on their screen that appears to be areas not refreshing properly. This issue will then spread to other applications. Eventually they will get a resource error message popping up on their screen. If they close excel everything will work normally again. I have all updates installed to current. When this happens I have checked available resources on the server and there is sometimes 2 Gigs of Ram available and only 20% of the processor is being u...

Adding highlighted cells only -Excel 2000
Anyone know if there is a way to add only cells that are highlighted? I would like to see quick sums of only the cells I have highlighted and hoping there might be a way to do this quickly and easily. I have to do this many times with various cells with differing number values. Thanks in advance K By "highlighted" do you mean colored or simply selected? If the latter, use the Sum on the Status Bar. If the former..................... You will have to use VBA to grab the colorindex of the cells. Do you want to do that? See Chip Pearson's site for UDF's for working with co...

How do I creat a doc with excel pages and different size word doc
How do I creat a doc with excel spreadsheets of different sizes and word doc of different sizes. ...

saving form size/location
My form is going to be used on different computers with different resolutions. I have the form set to be re-sizable and have scroll bars. But once the user resizes the form to their liking, I'd like it to stay that size. I'm using VBA, but am fairly new to it. I was thinking of saving the form size on close and setting it to that saved size on open. But how do I get and set the size and location? Jennifer You could create custom properties for the database and store preferences there, or you could store the preferences in a table that you use at Startup. Saving them at Close and...

Global Variables losing scope in Excel when developing
This is a multi-part message in MIME format. ------=_NextPart_000_000C_01C42C80.D0AD9790 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I have a vba module inside an Excel add-in with a global variable = pointing to a class in an external dll, in the form Public MyVar as new MyLibrary.MyClass The problem is that when I am developing and testing the add-in, the = variable loses scope (not initialize). I have to close everything and = restart Excel. Then all is OK. Any suggestion? PD. If a declare the variable without "new", ...

Printing from an excel spread sheet to form question
Hi, A friend picked up a ton of contiuous paper, 3 part, at a very good price, and wants to use it for billing. The paper alreadys has a form on it with a place for address, and the usual billing fields, amt, quantity, price per unit, date, etc. If we make a big spreadsheet, big to us would be about 1000 customers, is it possible to use that sheet, as a database, from which to draw the information from and then print on the pre-formated form feed paper into the right places? I know access can do this, but nobody in the office knows how to run access, and nobody wants to learn how either. T...

Multiply two columns in Excel or one column by one number
I am a beginner at this. Using Excel, all I want to do is to multiply 2 columns together to give a third column. For example, a list of numbers in column A against a list of numbers in column B to produce a column C - (A2 times B2 to equal a number C2)) or to multiply all the numbers in one column (like "calories" or A2-A18) times one number (like 0.2) to produce a third column. I tried to do this but the results replaced the numbers. and to multiply one column times two other numbers. I'm going nuts (I'm swearing all over and I don't usually swear) trying ...

excel #84
My computer crashed and when it came back up I didn't have microsoft excel, word nor powerpoint. Can you help me restore these programs? Perhaps you have just lost the shortcuts to these programs? Go to Start>Run and enter "excel.exe"(no quotes)>OK Does Excel start up? Open Windows Explorer and go to Program File\Microsoft Office\Office. Can you find Excel.exe or Winword.exe or any other Office executables? Do a Start>Search>Files and Folders for these files. Make sure your Folder Options>View settings are set to "show all hidden files" and "...

excel payroll calculator for canadians
Can anyone advise me on how to setup a payroll calculator in excel that would automatically deduct income tax, CPP, and EI. I've looked at the MS template and it is great. Is it possible to create a template like it, but have it calculate the necessary canadian deductions. Any help or a template would be great. Thanks! Can you post the link to the template you mentioned, so I can have a look. Am I correct in my understanding, you want to be able to, for example, input a monetary amount, and have the neccessary deductions calculated? Is that right? -- VBAvirgin -------------------...

Excel vs Access #2
Is there a good criteria that one could use to determine whether data should be put into a sophisticated excel spreadsheet or an Access database? I am trying to determine the best location for a new statistical project I am working on. Thanks! Amy "cvgairport" <cvgairport@discussions.microsoft.com> wrote in message news:D31BD327-BFE9-4C61-9448-4A0D40A0EB3F@microsoft.com... > Is there a good criteria that one could use to determine whether data should > be put into a sophisticated excel spreadsheet or an Access database? I am > trying to determine the best loca...

Excel 2007 RTM Bug
I'm using Excel 2007 to Connect to a SQL Server 2005 Analysis Server. The Show / Hide (+/-) buttons are not displaying when I add more than one dimenstion to a Row Label. This functionality worked in beta 2 but not in beta 2 trf. Excel 2007 is installed on the same machine as SQL 2005 AS. Thanks in advance for the help ...

Passwording Macros?
Is there a way to password protect macros or otherwise keep them from being edited? Thanks! See one answer in .programming. Please don't post the same message to multiple groups. It tends to fragment your answers, and potentially waste the time of those replying. See http://cpearson.com/excel/newposte.htm for tips on using these groups effectively. In article <00dc01c3aed0$e2530cb0$a501280a@phx.gbl>, "Loretta Jean" <anonymous@discussions.microsoft.com> wrote: > Is there a way to password protect macros or otherwise > keep them from being edited?...

How do I input email addresses in Excel without the hyperlink,
I need email addresses in my excel worksheet, but they must be text, not hyperlink. Iv'e been copying them to a word doc, then doing the "paste special" to put it in excel as text. That works, but is very time consuming. Is there a way to format a column so emails are text only? -- "You can have everything in life you want, if you will just help enough other people get what they want." -- Zig Ziglar Precede the email address with an apostrophe (') when keying. HTH Jason Atlanta, GA >-----Original Message----- >I need email addresses in my excel wor...

how do I import data in excel form SQL server?
Hello All, I've been trying to import data into excel from our SQL server. I have the sql script yielding the results. The real problem is when I use the data connectivity wizard, it only allows you to select one table from the database in your SQL server. However, my script involves two tables with a join. Any ideas would be helpful Thanks, Mitch Asuming you have rights on the Server, convert your 'script' (by which you probably mean query?) into a view. If you don't have adequate rights, then use MS Query to connect to SQL Server and use your que...

Save RichTextBox as RTF in A4 and landscape
I'r like to save my RTF-file (text frommy RichTextBox) in A4 format and landscape. Saving as RTF-file isn't the problem, but can't find any solution to add some information for A4 and landscape. The intention is that when a user opens the RTF-file using Ms Word, the page is in A4 format and in landcape. Any suggestions ? Anna anyone ? Anna "Anna" <Anna@notvalid.nospam> wrote in message news:OXsm3jtkKHA.5820@TK2MSFTNGP06.phx.gbl... > I'r like to save my RTF-file (text frommy RichTextBox) in A4 format and > landscape. >...

QUERY: API/SDK for Excel
Is there a MS Excel API/SDK? I just noticed a Excel plugin which was a dll file. I am wondering whether it's possible for one to create his own plugins for Excel and how to go about it? Also, is it possible to link in Excel with another application, say a 3rd party program. So that Excel worksheets and cells correspond to values stored in a 3rd party program's database. > Is there a MS Excel API/SDK? I just noticed a Excel plugin which was a dll > file. I am wondering whether it's possible for one to create his own > plugins for Excel and how to go about it? I ...

Save Event
How do a call the Save event automatically using VBA? I want to force the user to save when they close the window by clicking the X object on the top right hand side of the window. Any help would be appreciated Have you tried the before modal dialog event in VBA to hit the 'Save' button each time it comes up? "Tremor Olaes" wrote: > How do a call the Save event automatically using VBA? I want to force the > user to save when they close the window by clicking the X object on the top > right hand side of the window. Any help would be appreciated This is th...

Linking to individual Excel worksheets
I am am currently linking to excell workbooks from a presentation using Insert-Object-Current File with the linking option selected to display updated graphs on powerpoint presentation given through out the month. However this option only seems to link to the workbook itself. Is there a way to link to a specific tab with in the workbook? Thanks. On Jan 13, 2:02=A0pm, AL <A...@discussions.microsoft.com> wrote: > I am am currently linking to excell workbooks from a presentation using > Insert-Object-Current File with the linking option selected to display > updat...

can I autopopulate from a long drop down list in Excel?
I have a very long list of referring physicians in a drop down list for data entry people to populate. I would like them to type in the first 3 characters and be immediately directed to that area of the drop down list. Is this possible? Thanks! Instead of the dropdown. This will take you to the name in col J Sub gotonfirst3letteredname() myname = InputBox("Enter first 3 letters of name") If Len(myname) <> 3 Then MsgBox "THREE letters" Exit Sub End If Columns("J").Find(What:=myname, After:=Range("j1"), _ LookIn:=xlValues, LookA...

Excel formula not updating unless spreadsheet is saved
Hi I am running a spreadsheet where formulas link into other worksheets i.e. ='ASSORTMENT SHEET'!N23. I have noticed that when I update the cell reference above, the linked cell does not update automatically and only updates when I click save. I have since tested a new spreadsheet up, set up a linked cell and this refreshes immediately without having to save. If anyone has any ideas this would be very helpful. Thank you Brian Turn Calculation option to "Automatic" Gord Dibben MS Excel MVP On Thu, 29 Apr 2010 08:36:31 -0700 (PDT), "brian.b...

Excel in OS X
When I click on Format - Cells all I get is the sun spiral. The only way to get rid of it is Force Quit. Needless to say I can't format dates or numbers. Hi Merritt, Take visit to http://www.microsoft.com/mac/downloads.aspx and get the updates: 10.1.2 10.1.4 10.1.5 Install them in that order, then run Disk Utility First Aid to Repair permissions. Let us know with a reply posting whether that fixes things for you. -Jim Gordon Mac MVP All responses should be made to this newsgroup within the same thread. Thanks. About Microsoft MVPs: http://www.mvps.org/ Before posting a ...

Excel 2003
Word 2003 has a feature whereby you can select part of the text in a cell and apply shading to only that text. Does Excel have such a feature - or something similar? I need to put black shading on a few words of text in a cell, but not on ALL the text in that cell. You can do this if the cell contains text. You can't do it if the cell contains a formula. Select the cell, then highlight the appropriate characters in the formula and apply the formatting. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Peppermint" <P...

Shortcuts do not save in OUTLOOK 2003
Hello all, I have a problem. First let me tell you what my setup is. I am running Exchange 2003 and all of my clients have outlook 2003 with Hummingbird DM intergraded. When people save their shortcuts ,they last for a day or so and then disapear. Sometimes they disappear as soon as they exit outlook. Does anyone have any idea how to keep shortcuts from disappearing? Please let me know ASAP!. My A** depends on it!. thanks This seems to be a very common issue in Outlook 2003 - I see tons of posts looking for help, but no posts with suggested solutions. "Exchange King"...

Excel Styles Problem
I created a spreadsheet that uses several different styles. All styles use the same type and size font but the shading, font color and borders are different. The normal format has no borders, no fill/pattern, and the text is black. Another fill is "User currency format" , it has borders on all sides, a blue fill/attern and black text. In some of the cells I have not applied a style to (at least no intentially), the cell styles are "Normal" before I make an entry, if I enter text the cell remains formated with the Normal style but If I enter a number the style cha...