Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default hyperlink made easy???

Is there an easy way in excel to simply click on a cell in excel,
instruct excel that you want to create a hyperlink and then simply
select the cell to link to in the workbook?

Alternatively does anyone know how to create a macro that will instruct
the user to enter two cell references which will then be automatically
linked to each other?

If you imagine you are dealing with the most simple excel user you
won't be far wrong!!!! Thanks for any help!


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
ali ali is offline
external usenet poster
 
Posts: 1
Default hyperlink made easy???

I tried doing sonething very similar to this once but was told it was
'almost' impossible and i got no further with it. Sorry! Although if
anyone can prove me wrong i'd still be interested in seeing if its
possible.


---
Message posted from http://www.ExcelForum.com/

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default hyperlink made easy???

Hi

This is a quick start that can (and probably should) be refined for days:

Sub MakeLinks()
Dim R1 As Range, R2 As Range
Dim N1 As String, N2 As String

On Error Resume Next

Set R1 = Application.InputBox("Click cell 1", _
"Link between cells", _
Selection.Address, , , , , 8)
If R1 Is Nothing Then Exit Sub
Set R1 = R1(1)
N1 = InputBox("Decide a name for " & _
R1.Address & ":")
If N1 = "" Then Exit Sub

Set R2 = Application.InputBox("Click cell 2", _
"Link between cells", _
Selection.Address, , , , , 8)
If R2 Is Nothing Then Exit Sub
Set R2 = R2(1)
N2 = InputBox("Decide a name for " & _
R2.Address & ":")
If N2 = "" Then Exit Sub

ActiveWorkbook.Names.Add _
Name:=N1, RefersTo:="=" & _
R1.Parent.Name & "!" & _
R1.Address

ActiveWorkbook.Names.Add _
Name:=N2, RefersTo:="=" & _
R2.Parent.Name & "!" & _
R2.Address

R1.Parent.Hyperlinks.Add Anchor:=R1, _
Address:="", _
SubAddress:=N2, TextToDisplay:="Goto " & N2

R2.Parent.Hyperlinks.Add Anchor:=R2, _
Address:="", _
SubAddress:=N1, TextToDisplay:="Goto " & N1

End Sub

--
HTH. Best wishes Harald
Followup to newsgroup only please.

"index" wrote in message
...
Is there an easy way in excel to simply click on a cell in excel,
instruct excel that you want to create a hyperlink and then simply
select the cell to link to in the workbook?

Alternatively does anyone know how to create a macro that will instruct
the user to enter two cell references which will then be automatically
linked to each other?

If you imagine you are dealing with the most simple excel user you
won't be far wrong!!!! Thanks for any help!


---
Message posted from http://www.ExcelForum.com/



  #4   Report Post  
Posted to microsoft.public.excel.programming
ali ali is offline
external usenet poster
 
Posts: 1
Default hyperlink made easy???

Thanks very much for that, you've almost made me very very happy -
however at present the link appears to work, ie that cells are linked
(and turned blue) but when i come to click on the first cell i get the
message "Reference is not valid"

Any idea how to fix it - i've been waiting months for a solution so i'm
crossing all my fingers and toes!!

Once again, many thanks


---
Message posted from http://www.ExcelForum.com/

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default hyperlink made easy???

Hi

What's references is the name you enter in the "Name" prompt. If you enter a
name that already exists or a name that excel can't assign (like, you can't
assign the name "C4" to cell D3 because C4 is in use for cell C4) then
errors appear. The code should trap this after some refinement, but that's
more that I will put into a newsgroup posting. Until you fix that, enter
obvious, silly, unique names every time.

The reason for using names in hyperlinks is because you probably want the
references /links to follow when you insert and delete rows or columns.

--
HTH. Best wishes Harald
Followup to newsgroup only please

"ali" skrev i melding
...
Thanks very much for that, you've almost made me very very happy -
however at present the link appears to work, ie that cells are linked
(and turned blue) but when i come to click on the first cell i get the
message "Reference is not valid"

Any idea how to fix it - i've been waiting months for a solution so i'm
crossing all my fingers and toes!!

Once again, many thanks


---
Message posted from http://www.ExcelForum.com/





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 691
Default hyperlink made easy???

If I understand you correctly by clicking on a cell to supply that address,
you would actually be working with a HYPERLINK Worksheet Function
rather than code. You should be able select the cell on the other
location while building your formula.

If it is a HYPERLINK Worksheet Function you are working with, I have
some examples in

Worksheets in VBA Coding and in Worksheet Formulas
http://www.mvps.org/dmcritchie/excel....htm#hyperlink

With Ctrl+K or right-click then hyperlink
you would choose place in this document and type in the cell
address if in same sheet, but you can't select the cell to fill it
in automatically.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"index" wrote in message ...
Is there an easy way in excel to simply click on a cell in excel,
instruct excel that you want to create a hyperlink and then simply
select the cell to link to in the workbook?

Alternatively does anyone know how to create a macro that will instruct
the user to enter two cell references which will then be automatically
linked to each other?

If you imagine you are dealing with the most simple excel user you
won't be far wrong!!!! Thanks for any help!


---
Message posted from http://www.ExcelForum.com/



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default hyperlink made easy???

i'm loving the hyperlink macro but i'd like to remove the 'name th
cell' element of the macro - is it possible to modify macro to simpl
link the cells without naming them?

Your help is, once again, much appreciated

--
Message posted from http://www.ExcelForum.com

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
Excel Made Easy support website crapouts Excel Worksheet Functions 0 April 12th 08 01:11 PM
AutoFilter Made Easy Tom Excel Worksheet Functions 1 April 2nd 08 01:03 AM
Two paste options I'd like to see made easy t Excel Discussion (Misc queries) 1 August 22nd 06 11:28 PM
new user with easy question? not easy for me speakeztruth New Users to Excel 5 June 3rd 05 09:40 PM
3-D refrence made easy? Please help me out! Excel'ed Failures Excel Discussion (Misc queries) 6 December 13th 04 06:49 AM


All times are GMT +1. The time now is 12:19 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"