Updating links to external files using macros

Hi all

I have a file which contains links to data in an external file. Every week I 
need to update the link to a new file that is created. So for example, at the 
moment the link goes to a file called "Sales Firm 2010 2009-11-12", next week 
there will be a new file called "Sales Firm 2010 2009-11-19" which I will 
want to change this link to. The following week yet another external file 
will be created which I will want to change the links to again. All the 
external files are the same i.e. format, where the data is located, etc it's 
just new data.

At the moment I just go into "edit" then "links" and update from there but I 
want to pass this job on to other users who can just update at the push of a 
button i.e. I don't want to teach them all how to update links! 

Is this possible? 


-- 
James.
0
Utf
11/19/2009 11:57:01 AM
excel.programming 6508 articles. 2 followers. Follow

3 Replies
1802 Views

Similar Articles

[PageSpeed] 27

Please paste the following code in the ThisWorkbook module:

'---------------------------------------------------------------------------------------
' Procedure : Workbook_Open
' Author    : Dan
' Date      : 11/19/2009
' Purpose   : Assign Keyboard shortcut Ctrl+Shift+U to the macro
'---------------------------------------------------------------------------------------
'
Private Sub Workbook_Open()

   On Error GoTo Workbook_Open_Error

    Application.OnKey "^+U", "UpdateLinks"

Workbook_Open_Exit:
   On Error GoTo 0
   Exit Sub

Workbook_Open_Error:

    MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure 
Workbook_Open of VBA Document ThisWorkbook"
    GoTo Workbook_Open_Exit
    
End Sub


Please insert a module and paste this code:

Option Explicit
'---------------------------------------------------------------------------------------
' Procedure : UpdateLinks Macro
' Author    : Dan
' Date      : 11/19/2009
' Purpose   : Update links to the new external file Keyboard Shortcut: 
Ctrl+Shift+U
'---------------------------------------------------------------------------------------
'
Sub UpdateLinks()
    Dim dlgOpen As FileDialog
    Dim aLinks As Variant, i As Integer
    Dim oldLink As String, newLink As String, FileFolder As String

   On Error GoTo UpdateLinks_Error

    aLinks = ActiveWorkbook.LinkSources(xlExcelLinks)
    
    If Not IsEmpty(aLinks) Then
        For i = 1 To UBound(aLinks)
            If InStr(1, aLinks(i), "Sales Firm") > 0 Then oldLink = aLinks(i)
        Next i
    Else
        Err.Number = -99
        Err.Description = "There are no links in this workbook!"
        GoTo UpdateLinks_Error
    End If
    
    FileFolder = Left(oldLink, InStr(1, oldLink, "Sales Firm") - 1)
    
    Set dlgOpen = Application.FileDialog(msoFileDialogOpen)
        
    With dlgOpen
        .InitialFileName = FileFolder
        .AllowMultiSelect = False
        .Title = "Select the new file"
        If .Show = -1 Then
            newLink = .SelectedItems(1)
        Else
            Err.Number = -99
            Err.Description = "You must select a file!"
            GoTo UpdateLinks_Error
        End If
    End With
    
    For i = 1 To UBound(aLinks)
        If InStr(1, aLinks(i), "Sales Firm") > 0 Then 
ActiveWorkbook.ChangeLink aLinks(i), newLink, xlExcelLinks
    Next i


UpdateLinks_Exit:
   On Error GoTo 0
   Err.Clear
   Set dlgOpen = Nothing
   Set aLinks = Nothing
   Exit Sub

UpdateLinks_Error:

    MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure 
UpdateLinks"
    GoTo UpdateLinks_Exit
        
End Sub

Let me know if it works out.

Dan


"James" wrote:

> Hi all
> 
> I have a file which contains links to data in an external file. Every week I 
> need to update the link to a new file that is created. So for example, at the 
> moment the link goes to a file called "Sales Firm 2010 2009-11-12", next week 
> there will be a new file called "Sales Firm 2010 2009-11-19" which I will 
> want to change this link to. The following week yet another external file 
> will be created which I will want to change the links to again. All the 
> external files are the same i.e. format, where the data is located, etc it's 
> just new data.
> 
> At the moment I just go into "edit" then "links" and update from there but I 
> want to pass this job on to other users who can just update at the push of a 
> button i.e. I don't want to teach them all how to update links! 
> 
> Is this possible? 
> 
> 
> -- 
> James.
0
Utf
11/19/2009 5:42:10 PM
Hi Dan

Thank you for all your help. I got an error message which said "Compile 
Error: Next without For" under

For i = 1 To UBound(aLinks) 
If InStr(1, aLinks(i), "Sales Firm") > 0 Then 
ActiveWorkbook.ChangeLink aLinks(i), newLink, xlExcelLinks 
Next i 



-- 
James.


"Dan" wrote:

> Please paste the following code in the ThisWorkbook module:
> 
> '---------------------------------------------------------------------------------------
> ' Procedure : Workbook_Open
> ' Author    : Dan
> ' Date      : 11/19/2009
> ' Purpose   : Assign Keyboard shortcut Ctrl+Shift+U to the macro
> '---------------------------------------------------------------------------------------
> '
> Private Sub Workbook_Open()
> 
>    On Error GoTo Workbook_Open_Error
> 
>     Application.OnKey "^+U", "UpdateLinks"
> 
> Workbook_Open_Exit:
>    On Error GoTo 0
>    Exit Sub
> 
> Workbook_Open_Error:
> 
>     MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure 
> Workbook_Open of VBA Document ThisWorkbook"
>     GoTo Workbook_Open_Exit
>     
> End Sub
> 
> 
> Please insert a module and paste this code:
> 
> Option Explicit
> '---------------------------------------------------------------------------------------
> ' Procedure : UpdateLinks Macro
> ' Author    : Dan
> ' Date      : 11/19/2009
> ' Purpose   : Update links to the new external file Keyboard Shortcut: 
> Ctrl+Shift+U
> '---------------------------------------------------------------------------------------
> '
> Sub UpdateLinks()
>     Dim dlgOpen As FileDialog
>     Dim aLinks As Variant, i As Integer
>     Dim oldLink As String, newLink As String, FileFolder As String
> 
>    On Error GoTo UpdateLinks_Error
> 
>     aLinks = ActiveWorkbook.LinkSources(xlExcelLinks)
>     
>     If Not IsEmpty(aLinks) Then
>         For i = 1 To UBound(aLinks)
>             If InStr(1, aLinks(i), "Sales Firm") > 0 Then oldLink = aLinks(i)
>         Next i
>     Else
>         Err.Number = -99
>         Err.Description = "There are no links in this workbook!"
>         GoTo UpdateLinks_Error
>     End If
>     
>     FileFolder = Left(oldLink, InStr(1, oldLink, "Sales Firm") - 1)
>     
>     Set dlgOpen = Application.FileDialog(msoFileDialogOpen)
>         
>     With dlgOpen
>         .InitialFileName = FileFolder
>         .AllowMultiSelect = False
>         .Title = "Select the new file"
>         If .Show = -1 Then
>             newLink = .SelectedItems(1)
>         Else
>             Err.Number = -99
>             Err.Description = "You must select a file!"
>             GoTo UpdateLinks_Error
>         End If
>     End With
>     
>     For i = 1 To UBound(aLinks)
>         If InStr(1, aLinks(i), "Sales Firm") > 0 Then 
> ActiveWorkbook.ChangeLink aLinks(i), newLink, xlExcelLinks
>     Next i
> 
> 
> UpdateLinks_Exit:
>    On Error GoTo 0
>    Err.Clear
>    Set dlgOpen = Nothing
>    Set aLinks = Nothing
>    Exit Sub
> 
> UpdateLinks_Error:
> 
>     MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure 
> UpdateLinks"
>     GoTo UpdateLinks_Exit
>         
> End Sub
> 
> Let me know if it works out.
> 
> Dan
> 
> 
> "James" wrote:
> 
> > Hi all
> > 
> > I have a file which contains links to data in an external file. Every week I 
> > need to update the link to a new file that is created. So for example, at the 
> > moment the link goes to a file called "Sales Firm 2010 2009-11-12", next week 
> > there will be a new file called "Sales Firm 2010 2009-11-19" which I will 
> > want to change this link to. The following week yet another external file 
> > will be created which I will want to change the links to again. All the 
> > external files are the same i.e. format, where the data is located, etc it's 
> > just new data.
> > 
> > At the moment I just go into "edit" then "links" and update from there but I 
> > want to pass this job on to other users who can just update at the push of a 
> > button i.e. I don't want to teach them all how to update links! 
> > 
> > Is this possible? 
> > 
> > 
> > -- 
> > James.
0
Utf
11/20/2009 4:33:03 PM
Sorry ignore that! It's saying "Complie Error: Invalid outside procedure" 
when I run it which is off the "Update Links" module.
-- 
James.


"Dan" wrote:

> Please paste the following code in the ThisWorkbook module:
> 
> '---------------------------------------------------------------------------------------
> ' Procedure : Workbook_Open
> ' Author    : Dan
> ' Date      : 11/19/2009
> ' Purpose   : Assign Keyboard shortcut Ctrl+Shift+U to the macro
> '---------------------------------------------------------------------------------------
> '
> Private Sub Workbook_Open()
> 
>    On Error GoTo Workbook_Open_Error
> 
>     Application.OnKey "^+U", "UpdateLinks"
> 
> Workbook_Open_Exit:
>    On Error GoTo 0
>    Exit Sub
> 
> Workbook_Open_Error:
> 
>     MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure 
> Workbook_Open of VBA Document ThisWorkbook"
>     GoTo Workbook_Open_Exit
>     
> End Sub
> 
> 
> Please insert a module and paste this code:
> 
> Option Explicit
> '---------------------------------------------------------------------------------------
> ' Procedure : UpdateLinks Macro
> ' Author    : Dan
> ' Date      : 11/19/2009
> ' Purpose   : Update links to the new external file Keyboard Shortcut: 
> Ctrl+Shift+U
> '---------------------------------------------------------------------------------------
> '
> Sub UpdateLinks()
>     Dim dlgOpen As FileDialog
>     Dim aLinks As Variant, i As Integer
>     Dim oldLink As String, newLink As String, FileFolder As String
> 
>    On Error GoTo UpdateLinks_Error
> 
>     aLinks = ActiveWorkbook.LinkSources(xlExcelLinks)
>     
>     If Not IsEmpty(aLinks) Then
>         For i = 1 To UBound(aLinks)
>             If InStr(1, aLinks(i), "Sales Firm") > 0 Then oldLink = aLinks(i)
>         Next i
>     Else
>         Err.Number = -99
>         Err.Description = "There are no links in this workbook!"
>         GoTo UpdateLinks_Error
>     End If
>     
>     FileFolder = Left(oldLink, InStr(1, oldLink, "Sales Firm") - 1)
>     
>     Set dlgOpen = Application.FileDialog(msoFileDialogOpen)
>         
>     With dlgOpen
>         .InitialFileName = FileFolder
>         .AllowMultiSelect = False
>         .Title = "Select the new file"
>         If .Show = -1 Then
>             newLink = .SelectedItems(1)
>         Else
>             Err.Number = -99
>             Err.Description = "You must select a file!"
>             GoTo UpdateLinks_Error
>         End If
>     End With
>     
>     For i = 1 To UBound(aLinks)
>         If InStr(1, aLinks(i), "Sales Firm") > 0 Then 
> ActiveWorkbook.ChangeLink aLinks(i), newLink, xlExcelLinks
>     Next i
> 
> 
> UpdateLinks_Exit:
>    On Error GoTo 0
>    Err.Clear
>    Set dlgOpen = Nothing
>    Set aLinks = Nothing
>    Exit Sub
> 
> UpdateLinks_Error:
> 
>     MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure 
> UpdateLinks"
>     GoTo UpdateLinks_Exit
>         
> End Sub
> 
> Let me know if it works out.
> 
> Dan
> 
> 
> "James" wrote:
> 
> > Hi all
> > 
> > I have a file which contains links to data in an external file. Every week I 
> > need to update the link to a new file that is created. So for example, at the 
> > moment the link goes to a file called "Sales Firm 2010 2009-11-12", next week 
> > there will be a new file called "Sales Firm 2010 2009-11-19" which I will 
> > want to change this link to. The following week yet another external file 
> > will be created which I will want to change the links to again. All the 
> > external files are the same i.e. format, where the data is located, etc it's 
> > just new data.
> > 
> > At the moment I just go into "edit" then "links" and update from there but I 
> > want to pass this job on to other users who can just update at the push of a 
> > button i.e. I don't want to teach them all how to update links! 
> > 
> > Is this possible? 
> > 
> > 
> > -- 
> > James.
0
Utf
11/20/2009 4:43:03 PM
Reply:

Similar Artilces:

Highlighted word wont DEL when I use Bakspc only in office/word
When I highlight a word in and hit the Backspace key it will not delete the word, this is only in outlook and word , however I can delete using the backspace key using one key stroke at a time. In Tools > Options > Edit, check "Typing replaces selection". (In Word 2007 this option is at Office button > Word Options > Advanced.) -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. backspace key not working correctly wrote: > When I ...

NDRs forwarding to external contact
Hello, I have setup a contact with an external address, I then forward a user's email to this contact (as well as to their local mailbox). The forward works fine from within Exchange from internal users, but if an external user sends to this user, it delivers only to their internal mailbox and bounces for the external (#5.5.0 smtp;551 This is not a relay host). I appreciate Exchange shouldn't act as an open relay, but this is only specific, preconfigured email addresses. Do I have to enable this somewhere else? In ESM Navigate to Global Settings container, Internet Message Formats, ...

File size #11
I have read the other discussions on file sizes but they do not seem to address my problem. I have an Excel file that is 12mb large with low-res jpegs in it. This file also has merged cells to make it look pretty. Does Excel look at these merged cells as graphics? Is this why they are too big? I have run a macro to make sure that it goes to the last cell. How can I get the file smaller? How big are the graphics? If you remove them from the file, what is the size of the file and what is the size of the graphic files? To be sure you do not have extra formatting, if you open the file...

find action on log file
Hello there I want to use outside tool to find who made some update on table in my server I know that there are many tools for this. But can they do it on simple recovery model? Roy Goldhammer (royg@yahoo.com) writes: > I want to use outside tool to find who made some update on table in my > server > > I know that there are many tools for this. But can they do it on simple > recovery model? No. If you are using the simple recovery model, the contents of the log is wasted away everyonce in a while. Well, if the disk area has not been overwritten...

Maximum file sizes
Is there a recommended maximum file size for Excel 2000. PC spec 2Ghz P4 with 256 Mb Any advice appreciated Deus -------------- Does Not Exist Hi have a look at http://www.decisionmodels.com/memlimits.htm -- Regards Frank Kabel Frankfurt, Germany "Deus DNE" <deus.dne@ntlworld.com> schrieb im Newsbeitrag news:1561701c41d4f$358950f0$a001280a@phx.gbl... > Is there a recommended maximum file size for Excel 2000. > > PC spec 2Ghz P4 with 256 Mb > > Any advice appreciated > > Deus > -------------- > Does Not Exist ...

How to repair a .dll file in IE8
Several days ago I noticed in my Dependency Walker that the IESHIMS.dll files has a yellow circle with a question mark on it. What does this mean and How do I repair it? OS: Windows Vista Home Premium Browser Internet Explorer 8 -- TW Hi, See the History tab on that dialog. A web search for ieshims.dll files will also help you find a solution for that file. Regards. "TW" <TW@discussions.microsoft.com> wrote in message news:63E61463-D766-4ABC-B081-BFA8C04FB159@microsoft.com... > Several days ago I noticed in my Dependency Walker that the IESHIMS....

Using Relative path for XML data file?
Is there a way to specify a relative path to an XML data file imported into Excel 2003? I am writing a web app that generates report data as XML for the user to download to their local machine. This data is to be consumed by an Excel reporting spreadsheet, which contains display-formatted tables and charts that are mapped to various data fields in an XML Map, which is in turn linked to the xml data file they will download. The idea is the user only needs to download the data for updates, not the whole spreadsheet. However, since I cannot predict the path where the user will store their...

unsolicited entry in the folder "Temporary Internet Files"
Hello, I am working on a programme which browses web sites and runs under XP. The http download is as follows: pServer = Isession -> GetHttpConnection(strServerName, nPort); pFile = pServer->OpenRequest(CHttpConnection::HTTP_VERB_GET, strObject, NULL, 1, NULL, NULL, dwHttpRequestFlags); pFile->SendRequest(); pFile->QueryInfoStatusCode(dwStatusCode); if(dwStatusCode == 200) { pFile -> QueryInfo(HTTP_QUERY_LAST_MODIFIED, &sysT); status.lastMod = sysT; if(DBlastMod == status.lastMod) //URL content has not changed since the last visit ...

Formula without using numbers after decimal in the answer
I have a formula that derives the answer from a figure with a decimal. I don't want to use the figures after the decimal. Is there a way to just use the whole number and omit the numbers after the decimal without having to manually key in all these numbers manually? Thanks, Mustang You can use the INT function. This 'rounds down' any number to th nearest integer, e.g. if A1=2.567, a formula in B2 of =INT(A1) return 2 HTH Bruc -- swatsp0 ----------------------------------------------------------------------- swatsp0p's Profile: http://www.excelforum.com/member.php?...

Linking files 2 ways
I have a work book that is linked to another and vise versa. As thus: Workbook A is where the input of data is made; Workbook B has a link to the input from workbook A; Workbook A retrieves the altered data back as a link. Although this all works fine with both books open, I note that if I open workbook A by itself, that the data it retrieves from Workbook B is not updated . If However, both books are open, there's no problem. I thought linked books were updated automatically if the Update remote references has been selected?? But it appears that the second book is not updated until it ...

AR invoicing update GL but not receivables
We have an issue where the GL is updated with invoicing activity, but in some cases the receivables side is not. Any piror issues with this, advice on how to figure out the problem, etc? Thanks I have only heard of the opposite happening - AR subledger is updated, but the GL is not. Can you walk through exactly what happens? What type of AR document in what screen? What is the 'On Account' amount? What are the GL distributions? Where are you going to see that the AR subledger is not updated? Where do you see that the GL is updated? -- Victoria Yudin Microsoft MVP - Gre...

OL2007 not move big files from outbox to sent
Hi, We have 2 computers with separate email accounts on Roadrunner. One machine has XP with Outlook 2002-sp3 and works without any problems. The other has Outlook 2007 on Vista and has problems sending files over a meg or so in size. It seems to actually send the file but the file remains in the outbox folder and does not move it to the sent folder. I say it "seems" to send the file because some people complain of getting muliple copies and others don't seem to get them at all. If I hit send again (not set up for auto send) it seems to send the file again (why some ...

I need a macro
I would like a macro to do the following: I would place the the cursor in any cell and this macro would give me the average of all the entries to the left if the selected cell. EX: I place the cursor in cell M12. I want this macro on display in cell M12 the average of all the values from Col C12 to Col L12. Note that there may NOT be entries in all the cells in that range. Also the start point would always be col C .Thanks You can do this easily with a worksheet_selection event in the sheet module but you would probably want to restrict to a certain range or columns and rows or it woul...

cannot open hyper links in outlook
when I try to open a hyperlink in outlook, I get the following message: This operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator. ----- I am the system administrator. HELP This is a problem with IE, not Outlook. You need to reset your internet settings in IE's Tools, Internet Options, Advanced tab. (Or Control Panel, Internet options, Advanced tab). See http://www.slipstick.com/problems/link_restrict.htm for more information. "Donald McNeely" <Donald McNeely@discussions.microsoft.com>...

How to automate increasing the form cache registry/file etc...
I want to roll out a batch file to make a number of tweaks to CRM The body of it would go REGEDIT /S Kerberosefix.reg REGEDIT /S ForceFormreload.reg REGEDIT /S OutlookFix.reg It would also rename OSA.exe to OSA.bad Remove OSA.exe From the startup menu I need help finding a way to use my batch file to increase the Outlook Form cache from the default 4MB to 50 MB.. This makes CRm more stable and faster for communications. I dont want to manually do this, as it time consuming, are my end users would not be reliable in doing it themselves. I also want to make another batch file or button that...

Disable Secure Sockets Layer on exchange server when using RPC over HTTP
Hi im trying to enable RPC over HTTP to enable users to establish contact to my Excahger server 2003 over the internet. Now, I dont want to use SSL (security not that important) and i am told by this article that i can disable SSL in windows registry. Quote: Note While RPC over HTTP does not require Secure Sockets Layer, you must modify the registry to enable RPC over HTTP if you do not want to use Secure Sockets Layer. Microsoft recommends that you enable and require Secure Sockets Layer for your RPC over HTTP communications. At this address: http://support.microsoft.com/?id=833401 But i ...

using the journal on outlook
Once I link an email to the journal, can I still find that email in my mail box? I seem to be able to get to it only via the journal. If this is the way it is supposed to be, how do I remove it from the journal and get it back into my mail box? Am I just missing something? -- thanks, Independent Are you linking to the item or putting a copy into the journal item? Also, has the item been archived or not? "Independent" <Independent@discussions.microsoft.com> wrote in message news:868279F2-53C8-403A-97F5-604CEECD873C@microsoft.com... > Once I link an email to the journ...

CSV Files and VLOOKUP error
Does anyone know why VLOOKUP and Compare formulas don't work o information originating from a CSV file? I've tried copying an pasting values only (to leave behind any formatting), but it doesn' help. Through countless tests, I've narrowed it down to the CSV file bein the only possible cause -- Message posted from http://www.ExcelForum.com Hi ajpowers, Just a guess but the imported data may have leading or trailing spaces or are numbers stored as text. You could use the formula =A1=D1 to see if you get a true or false, where A1 is the lookup value and D1 ia the CVS valu...

Excel corrupts when asking to update vlookups
We are experiencing weird behavior with some Office 2K3 Excel spreadsheets that contain lots of calculations, but no macros. On some pc’s Excel acts normally, on others you get the error. I have a couple of screen shots available. Any help is appreciated. If desired, send your file to my address below. I will only look if: 1. You send a copy of this message on an inserted sheet 2. You give me the newsgroup and the subject line 3. You send a clear explanation of what you want 4. You send before/after examples and expected results. -- Don Gu...

Security Updates-Uninstall
I was wondering if anyone knows how to backdown security updates? We ran the latest security updates for our servers and now most of our applications won't run properly. Has anyone had this experience before? Can we back these down? Cheers. Control Panel -> Add remove programs ??? "Geoff" wrote: > I was wondering if anyone knows how to backdown security > updates? We ran the latest security updates for our > servers and now most of our applications won't run > properly. Has anyone had this experience before? Can we > back these down? > ...

Let me use the Line Color icon on charts
It would speed up a lot of my work if I could use the Line Color icon on Excel charts, the same way I am able to use the Fill Color and Font Color icons. However, when I highlight any chart object, like the Plot Area, Chart Area, or a Series, the Line Color icon is disabled. -- Stuart Bratesman, Jr., MPP Muskie School of Public Service Univ. of Southern Maine Portland, Maine ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If ...

Does Outlook use the DAV protocol?
I'm an Outlook Express user who wants to switch to Outlook. I received a notice from Microsoft that includes the following: "... as of June 30, 2008, Microsoft is disabling the DAV protocol and you will no longer be able to access your Hotmail Inbox via Outlook Express." Please tell me if this action by Microsoft will affect Outlook in the same manner, or am I free to make the switch. "BudV" <BudVitoff@(NO)att.(SPAM)net> wrote in message news:%230XUDi%23zIHA.2384@TK2MSFTNGP02.phx.gbl... > I'm an Outlook Express user who wants to switch to Outlook...

Search media files
I have WMP 11 on Windows XP SP3. I have recently move all my music on an external hard disk. Now that I want to search the media files so that it changes the file path and I can listen to my music, it seems that there is no search media files in my Tools menu. What am I doing wrong? On Sun, 14 Mar 2010 14:22:01 -0700, newsy <newsy@discussions.microsoft.com> wrote: >I have WMP 11 on Windows XP SP3. I have recently move all my music on an >external hard disk. Now that I want to search the media files so that it >changes the file path and I can listen to my music, i...

Trouble in Save existing file
Hi there, I am using GetSaveFileName(), OnSaveDocument() to save configuration file of my application. Trouble is when I open existing file, edit, and try to save it as the same name, it compains like "Access to file was denied" and I can't save it. But it can be saved as a new name by SaveAs menu. One other thing is this trouble is happening only in Window2000 PCs. It just works well in Window 98. The application is developed in Windows 2000 and I am using Flags like OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST; Please help. Bob NZ >Hi there, I am using GetSaveFileName(), OnSaveD...

Any way to open an excel file directly to a worksheet?
I am building an application with an icon that launches an excel file when clicked. Is there any way I can open the file directly to a specified worksheet? The names of the worksheet are fixed and so is the file, so I am guessing adding some parameter after the filename should do the trick. Any help will be appreciated. Regards Sid -- skiddyrow ------------------------------------------------------------------------ skiddyrow's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=23965 View this thread: http://www.excelforum.com/showthread.php?threadid=386335 Hey...