Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have seen this done before in the past, like 4 years ago with Excel95, but
every attempt I have made to recreate this has failed. Please help. I want to use a cell to enter my hyperlink location such as C:\Myfile or www.google.com. Now I want VB to look at the cell, lets say cell A1 has this hyperlink in it, and perform the ActiveWorkbook.FollowHyperlink Address command to open Windows Explorer, or Internet Explorer, to that location. How do I get VB to follow a hyperlink that has been entered in a cell anf then, if needed, opening the appropriate program like Windows Explorer or Internet Explorer? Or could it be a different command? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Stranger! (How about a real name?)
---"SJW_OST" schrieb ... I have seen this done before in the past, like 4 years ago with Excel95, but [...] How do I get VB to follow a hyperlink that has been entered in a cell anf then, if needed, opening the appropriate program like Windows Explorer or Internet Explorer? Or could it be a different command? (1) Hyperlinks have been introduced with Office 97?! (2) Try something like this: Range("A1").Hyperlinks(1).Follow Greetings from Vienna, Austria, -Robert Gelbmann- |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Well hello there buddy! Hope you are doing well.
Thanks for the Excel history lesson. As I mentioned, it has been a while sense I saw this done so my Excel version, obviously, was off. Sorry 'bout that. When I try your solution, I keep getting Run-time error '9': Subscript out of range. I have entered H:\ in cell A1 on Sheet1. I then went into VB Editor and entered; Sub A() Range("A1").Hyperlinks(1).Follow End Sub Is there something I am doing incorrectly? Have I missed something? Oh yea, my name is Stephen :-) "Robert Gelbmann" wrote: Hi Stranger! (How about a real name?) ---"SJW_OST" schrieb ... I have seen this done before in the past, like 4 years ago with Excel95, but [...] How do I get VB to follow a hyperlink that has been entered in a cell anf then, if needed, opening the appropriate program like Windows Explorer or Internet Explorer? Or could it be a different command? (1) Hyperlinks have been introduced with Office 97?! (2) Try something like this: Range("A1").Hyperlinks(1).Follow Greetings from Vienna, Austria, -Robert Gelbmann- |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ok, so I am a 'RON. I didn't enter the "hyperlink" I just typed H:\ into cell
A1. Once I entered H:\ as a hyperlink, your code worked like I wanted. Thank you :-) "SJW_OST" wrote: Well hello there buddy! Hope you are doing well. Thanks for the Excel history lesson. As I mentioned, it has been a while sense I saw this done so my Excel version, obviously, was off. Sorry 'bout that. When I try your solution, I keep getting Run-time error '9': Subscript out of range. I have entered H:\ in cell A1 on Sheet1. I then went into VB Editor and entered; Sub A() Range("A1").Hyperlinks(1).Follow End Sub Is there something I am doing incorrectly? Have I missed something? Oh yea, my name is Stephen :-) "Robert Gelbmann" wrote: Hi Stranger! (How about a real name?) ---"SJW_OST" schrieb ... I have seen this done before in the past, like 4 years ago with Excel95, but [...] How do I get VB to follow a hyperlink that has been entered in a cell anf then, if needed, opening the appropriate program like Windows Explorer or Internet Explorer? Or could it be a different command? (1) Hyperlinks have been introduced with Office 97?! (2) Try something like this: Range("A1").Hyperlinks(1).Follow Greetings from Vienna, Austria, -Robert Gelbmann- |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Now that I have this down, I think, how can I use a hyperlink in this fashion
as a save location? Thanks for your help, Stephen "SJW_OST" wrote: Ok, so I am a 'RON. I didn't enter the "hyperlink" I just typed H:\ into cell A1. Once I entered H:\ as a hyperlink, your code worked like I wanted. Thank you :-) "SJW_OST" wrote: Well hello there buddy! Hope you are doing well. Thanks for the Excel history lesson. As I mentioned, it has been a while sense I saw this done so my Excel version, obviously, was off. Sorry 'bout that. When I try your solution, I keep getting Run-time error '9': Subscript out of range. I have entered H:\ in cell A1 on Sheet1. I then went into VB Editor and entered; Sub A() Range("A1").Hyperlinks(1).Follow End Sub Is there something I am doing incorrectly? Have I missed something? Oh yea, my name is Stephen :-) "Robert Gelbmann" wrote: Hi Stranger! (How about a real name?) ---"SJW_OST" schrieb ... I have seen this done before in the past, like 4 years ago with Excel95, but [...] How do I get VB to follow a hyperlink that has been entered in a cell anf then, if needed, opening the appropriate program like Windows Explorer or Internet Explorer? Or could it be a different command? (1) Hyperlinks have been introduced with Office 97?! (2) Try something like this: Range("A1").Hyperlinks(1).Follow Greetings from Vienna, Austria, -Robert Gelbmann- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
totally newbie question about macros and programing it | Excel Programming | |||
excel 2007 macro/vb programing question | Excel Programming | |||
excel question borderline programing | New Users to Excel | |||
Hyperlink Question | Excel Discussion (Misc queries) | |||
Hyperlink Question | Excel Discussion (Misc queries) |