Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dd dd is offline
external usenet poster
 
Posts: 95
Default Hyperlink question

I have a list of hyperlinks - to an unusual filetype. When the user clicks
on a link, a message box appears stating "unable to open file".

I want to set it up so that excel asks the user where to save the file,
rather than try to open it.

Regards
Dylan


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Hyperlink question

I would use either the file scripting object to kick off a save as
dialog of the application.filedialogs

Regards,
Eddie
http://HelpExcel.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Hyperlink question

Let's say in A1 thru A20 we have a list of hyperlinks. They are all set to
place in this documents. The "friendly" names are the file names:

file1.arg
fil4.narfl
procedure.qwerty
..
..
..


So column A has both hyperlinks and the desired filenames/types
A1 links to Z1
A2 links to Z2
A3 links to Z3
..
..
..

So clicking on A1 just takes you to Z1.

We also have the following Event macro in worksheet code:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Range("Z:Z"), Target) Is Nothing Then
Exit Sub
End If
v = Cells(Target.Row, 1).Value
s = Application.InputBox("Enter Path for file save", 2)
ChDir s
If Right(s, 1) < "\" Then
s = s & "\"
End If
ActiveWorkbook.SaveAs Filename:=s & v
End Sub

So clicking on A1 gets us to Z1 and getting to Z1 trips the macro. The user
supplies the path and column A supplies the filename
--
Gary''s Student
gsnu200705


"dd" wrote:

I have a list of hyperlinks - to an unusual filetype. When the user clicks
on a link, a message box appears stating "unable to open file".

I want to set it up so that excel asks the user where to save the file,
rather than try to open it.

Regards
Dylan



  #4   Report Post  
Posted to microsoft.public.excel.programming
dd dd is offline
external usenet poster
 
Posts: 95
Default Hyperlink question

I can see where you're going with a worksheet selection change event. I
don't understand how I link D8 to Z8, when the cell already contains a
hyperlink to the external file.

What does this do?
file1.arg
fil4.narfl
procedure.qwerty

My workbook contains code to find and populate the sheet with files found of
a specific filetype.

My hyperlinks start on Row 8 and are made up of adding together Cell
B3+A8+B8+C8 (or whatever Row it is)

"Gary''s Student" wrote in message
...
Let's say in A1 thru A20 we have a list of hyperlinks. They are all set to
place in this documents. The "friendly" names are the file names:

file1.arg
fil4.narfl
procedure.qwerty
..
..
..


So column A has both hyperlinks and the desired filenames/types
A1 links to Z1
A2 links to Z2
A3 links to Z3
..
..
..

So clicking on A1 just takes you to Z1.

We also have the following Event macro in worksheet code:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Range("Z:Z"), Target) Is Nothing Then
Exit Sub
End If
v = Cells(Target.Row, 1).Value
s = Application.InputBox("Enter Path for file save", 2)
ChDir s
If Right(s, 1) < "\" Then
s = s & "\"
End If
ActiveWorkbook.SaveAs Filename:=s & v
End Sub

So clicking on A1 gets us to Z1 and getting to Z1 trips the macro. The user
supplies the path and column A supplies the filename
--
Gary''s Student
gsnu200705


"dd" wrote:

I have a list of hyperlinks - to an unusual filetype. When the user
clicks
on a link, a message box appears stating "unable to open file".

I want to set it up so that excel asks the user where to save the file,
rather than try to open it.

Regards
Dylan





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Hyperlink question

From your original posting, I got that you had hyperlinks to files and that
you wanted clicking on the link to start a SaveAs dialog rather than a GoTO
dialog.

I got that the link should supply the filename/filetype and the dialog would
supply the path for the save.

For normal hyperlink operation, click on the link causes the system to try
to either goto the file or open the file.

The option I suggested was to have the hyperlink goto a column in the code.
Getting there would trigger a macro. Because the macro "knows" from what row
on the column it was called, it can get the filename/type from the original
hyperlink.

The InputBox gets the user to supply whaere the file should be saved and the
macro completes the save.

This is just an option. I have used it before for users who want a
one-click way to start a macro.
--
Gary''s Student
gsnu200706


"dd" wrote:

I can see where you're going with a worksheet selection change event. I
don't understand how I link D8 to Z8, when the cell already contains a
hyperlink to the external file.

What does this do?
file1.arg
fil4.narfl
procedure.qwerty

My workbook contains code to find and populate the sheet with files found of
a specific filetype.

My hyperlinks start on Row 8 and are made up of adding together Cell
B3+A8+B8+C8 (or whatever Row it is)

"Gary''s Student" wrote in message
...
Let's say in A1 thru A20 we have a list of hyperlinks. They are all set to
place in this documents. The "friendly" names are the file names:

file1.arg
fil4.narfl
procedure.qwerty
..
..
..


So column A has both hyperlinks and the desired filenames/types
A1 links to Z1
A2 links to Z2
A3 links to Z3
..
..
..

So clicking on A1 just takes you to Z1.

We also have the following Event macro in worksheet code:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Range("Z:Z"), Target) Is Nothing Then
Exit Sub
End If
v = Cells(Target.Row, 1).Value
s = Application.InputBox("Enter Path for file save", 2)
ChDir s
If Right(s, 1) < "\" Then
s = s & "\"
End If
ActiveWorkbook.SaveAs Filename:=s & v
End Sub

So clicking on A1 gets us to Z1 and getting to Z1 trips the macro. The user
supplies the path and column A supplies the filename
--
Gary''s Student
gsnu200705


"dd" wrote:

I have a list of hyperlinks - to an unusual filetype. When the user
clicks
on a link, a message box appears stating "unable to open file".

I want to set it up so that excel asks the user where to save the file,
rather than try to open it.

Regards
Dylan






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
Another Hyperlink question Bob Excel Worksheet Functions 1 March 12th 09 08:11 PM
Hyperlink Question Fill-in Form General Questions Excel Discussion (Misc queries) 0 April 25th 08 07:19 PM
Hyperlink question Greg[_27_] Excel Programming 1 June 5th 06 08:34 PM
Hyperlink Question nastech Excel Discussion (Misc queries) 0 November 1st 05 11:41 PM
hyperlink question Pam Coleman Excel Discussion (Misc queries) 1 July 14th 05 04:20 PM


All times are GMT +1. The time now is 05:14 AM.

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"