Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Larry M in NE
 
Posts: n/a
Default select a file name for a link?

I want to include a formula with a link name in a file template that will be
used by others. The file name to be in the file name must vary each time a
new file is created and named from the template. Each file includes the
person's name and a month year indication i.e. larry082005.xls each file
must link the prior month. Suggestions?
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

Create a dummy file in the same location.

Use that dummy file as the link.

Tell the users to edit|link|change source
(or edit|replace to modify the link)

after they've opened the workbook.



Larry M in NE wrote:

I want to include a formula with a link name in a file template that will be
used by others. The file name to be in the file name must vary each time a
new file is created and named from the template. Each file includes the
person's name and a month year indication i.e. larry082005.xls each file
must link the prior month. Suggestions?


--

Dave Peterson
  #3   Report Post  
Larry M in NE
 
Posts: n/a
Default

Thanks. I left out an important piece of information. Although the cells
that need the varibale file name are not locked, the sheet is protected. The
link update is not allowed in the protected sheet.

"Dave Peterson" wrote:

Create a dummy file in the same location.

Use that dummy file as the link.

Tell the users to edit|link|change source
(or edit|replace to modify the link)

after they've opened the workbook.



Larry M in NE wrote:

I want to include a formula with a link name in a file template that will be
used by others. The file name to be in the file name must vary each time a
new file is created and named from the template. Each file includes the
person's name and a month year indication i.e. larry082005.xls each file
must link the prior month. Suggestions?


--

Dave Peterson

  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

Give them a macro that
prompts for the new filename
validates that the file actually exists
unprotects the worksheet
does the change
reprotects the worksheet

Kind of:

Option Explicit
Sub testme()
Dim myFileName As Variant
Dim testStr As String

myFileName = Application.GetOpenFilename(filefilter:="Excel files, *.xls")

If myFileName = False Then
Exit Sub
End If

With Worksheets("sheet1")
.Unprotect Password:="hi"
.Cells.Replace what:="oldlinkname", replacement:=myFileName
.Protect Password:="hi"
End With
End Sub

(replace OldLinkName with the dummy workbook name--full path, too!)


Larry M in NE wrote:

Thanks. I left out an important piece of information. Although the cells
that need the varibale file name are not locked, the sheet is protected. The
link update is not allowed in the protected sheet.

"Dave Peterson" wrote:

Create a dummy file in the same location.

Use that dummy file as the link.

Tell the users to edit|link|change source
(or edit|replace to modify the link)

after they've opened the workbook.



Larry M in NE wrote:

I want to include a formula with a link name in a file template that will be
used by others. The file name to be in the file name must vary each time a
new file is created and named from the template. Each file includes the
person's name and a month year indication i.e. larry082005.xls each file
must link the prior month. Suggestions?


--

Dave Peterson


--

Dave Peterson
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
Use a cell's value to set the source file name in link Lost in Parsippany Excel Worksheet Functions 2 August 30th 05 05:48 PM
Putting Excel formatting and/or formulas into CSV file Frank D. Nicodem, Jr. Excel Discussion (Misc queries) 1 July 11th 05 10:18 PM
Weekly Transaction Processing Ralph Howarth Excel Worksheet Functions 4 January 19th 05 05:37 AM
When I select "Open" from the "File" menu in Excel, I get only a . dan Excel Discussion (Misc queries) 1 November 30th 04 11:25 PM
Open a file in excel from a link in eplorer Dave Peterson Excel Discussion (Misc queries) 0 November 26th 04 01:25 AM


All times are GMT +1. The time now is 03:15 PM.

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

About Us

"It's about Microsoft Excel"