ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Opening hyperlinks with macro?? (https://www.excelbanter.com/excel-discussion-misc-queries/40771-opening-hyperlinks-macro.html)

Frazer

Opening hyperlinks with macro??
 
Hi, im not too great at excel so was wondering if anyone out there could help
me.
I cant really say what this is actually for, but ill give you the main idea.
Every day, i generate a long list of hyperlinks in excel which i have to open
and check. Obviously as there are so many, it takes a long time to open one,
check it, close it, open the next, etc, scrolling down all the time. I was
wondering if there was any way, by use of macros or otherwise, that i could
open all the links together automatically so i wouldnt have to keep going
back to excel. Any help anyone can give me would be very much appreciated.
Thanks!

Frazer

oh and i should also mention that clicking on the links whilst recording a
macro does not work- this simply selects the cell rather than clicking the
link

"Frazer" wrote:

Hi, im not too great at excel so was wondering if anyone out there could help
me.
I cant really say what this is actually for, but ill give you the main idea.
Every day, i generate a long list of hyperlinks in excel which i have to open
and check. Obviously as there are so many, it takes a long time to open one,
check it, close it, open the next, etc, scrolling down all the time. I was
wondering if there was any way, by use of macros or otherwise, that i could
open all the links together automatically so i wouldnt have to keep going
back to excel. Any help anyone can give me would be very much appreciated.
Thanks!


StinkeyPete

This is a quick and dirty way to do it:

Sub Macro1()
'You will need to adjust the Range("A1:A10") to include your entire list.

Dim cnt As Integer
cnt = 1

For Each c In Worksheets("Sheet1").Range("A1:A10").Cells
Range("A" & cnt).Select
On Error Resume Next
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
cnt = cnt + 1
Next

End Sub

"Frazer" wrote:

oh and i should also mention that clicking on the links whilst recording a
macro does not work- this simply selects the cell rather than clicking the
link

"Frazer" wrote:

Hi, im not too great at excel so was wondering if anyone out there could help
me.
I cant really say what this is actually for, but ill give you the main idea.
Every day, i generate a long list of hyperlinks in excel which i have to open
and check. Obviously as there are so many, it takes a long time to open one,
check it, close it, open the next, etc, scrolling down all the time. I was
wondering if there was any way, by use of macros or otherwise, that i could
open all the links together automatically so i wouldnt have to keep going
back to excel. Any help anyone can give me would be very much appreciated.
Thanks!


Frazer

Thanks for the reply, but as i said i am not too great at excel so could
anyone please give a bit more information as to what that actually means??

"StinkeyPete" wrote:

This is a quick and dirty way to do it:

Sub Macro1()
'You will need to adjust the Range("A1:A10") to include your entire list.

Dim cnt As Integer
cnt = 1

For Each c In Worksheets("Sheet1").Range("A1:A10").Cells
Range("A" & cnt).Select
On Error Resume Next
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
cnt = cnt + 1
Next

End Sub

"Frazer" wrote:

oh and i should also mention that clicking on the links whilst recording a
macro does not work- this simply selects the cell rather than clicking the
link

"Frazer" wrote:

Hi, im not too great at excel so was wondering if anyone out there could help
me.
I cant really say what this is actually for, but ill give you the main idea.
Every day, i generate a long list of hyperlinks in excel which i have to open
and check. Obviously as there are so many, it takes a long time to open one,
check it, close it, open the next, etc, scrolling down all the time. I was
wondering if there was any way, by use of macros or otherwise, that i could
open all the links together automatically so i wouldnt have to keep going
back to excel. Any help anyone can give me would be very much appreciated.
Thanks!


Frazer

OK i think i know what to do with it. maybe. probably wrong though.....i put
that code stuff there into a visual basic module, and it comes up as a macro,
but it doesnt actually open a new window for any of the links, i think all it
is doing is selecting each cell rather than actually opening the hyperlink in
each cell

any help??

"Frazer" wrote:

Thanks for the reply, but as i said i am not too great at excel so could
anyone please give a bit more information as to what that actually means??

"StinkeyPete" wrote:

This is a quick and dirty way to do it:

Sub Macro1()
'You will need to adjust the Range("A1:A10") to include your entire list.

Dim cnt As Integer
cnt = 1

For Each c In Worksheets("Sheet1").Range("A1:A10").Cells
Range("A" & cnt).Select
On Error Resume Next
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
cnt = cnt + 1
Next

End Sub

"Frazer" wrote:

oh and i should also mention that clicking on the links whilst recording a
macro does not work- this simply selects the cell rather than clicking the
link

"Frazer" wrote:

Hi, im not too great at excel so was wondering if anyone out there could help
me.
I cant really say what this is actually for, but ill give you the main idea.
Every day, i generate a long list of hyperlinks in excel which i have to open
and check. Obviously as there are so many, it takes a long time to open one,
check it, close it, open the next, etc, scrolling down all the time. I was
wondering if there was any way, by use of macros or otherwise, that i could
open all the links together automatically so i wouldnt have to keep going
back to excel. Any help anyone can give me would be very much appreciated.
Thanks!


StinkeyPete

Right click on the tab you are working on and click on view code. THe copy
and paste from Sub Macro1() to End sub. Then change the code Range("A1:A10")
to include your entire list (assuming it is in the A coulmn). If it is not in
the "A" column you will have to change the line "Range("A" & cnt).Select"
change the A to the correct column. Once this is done run the macro.

ToolsMacroMacros and select Macro1 and run.

"Frazer" wrote:

Thanks for the reply, but as i said i am not too great at excel so could
anyone please give a bit more information as to what that actually means??

"StinkeyPete" wrote:

This is a quick and dirty way to do it:

Sub Macro1()
'You will need to adjust the Range("A1:A10") to include your entire list.

Dim cnt As Integer
cnt = 1

For Each c In Worksheets("Sheet1").Range("A1:A10").Cells
Range("A" & cnt).Select
On Error Resume Next
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
cnt = cnt + 1
Next

End Sub

"Frazer" wrote:

oh and i should also mention that clicking on the links whilst recording a
macro does not work- this simply selects the cell rather than clicking the
link

"Frazer" wrote:

Hi, im not too great at excel so was wondering if anyone out there could help
me.
I cant really say what this is actually for, but ill give you the main idea.
Every day, i generate a long list of hyperlinks in excel which i have to open
and check. Obviously as there are so many, it takes a long time to open one,
check it, close it, open the next, etc, scrolling down all the time. I was
wondering if there was any way, by use of macros or otherwise, that i could
open all the links together automatically so i wouldnt have to keep going
back to excel. Any help anyone can give me would be very much appreciated.
Thanks!


Frazer

Ive done all that but its not working......I think all thats happening is
that each cell is being selected, but i need the hyperlink to open, which is
not happening at the moment. I have copied all the code exactly so i dont
think that is the problem.....any more ideas??

"StinkeyPete" wrote:

This is a quick and dirty way to do it:

Sub Macro1()
'You will need to adjust the Range("A1:A10") to include your entire list.

Dim cnt As Integer
cnt = 1

For Each c In Worksheets("Sheet1").Range("A1:A10").Cells
Range("A" & cnt).Select
On Error Resume Next
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
cnt = cnt + 1
Next

End Sub

"Frazer" wrote:

oh and i should also mention that clicking on the links whilst recording a
macro does not work- this simply selects the cell rather than clicking the
link

"Frazer" wrote:

Hi, im not too great at excel so was wondering if anyone out there could help
me.
I cant really say what this is actually for, but ill give you the main idea.
Every day, i generate a long list of hyperlinks in excel which i have to open
and check. Obviously as there are so many, it takes a long time to open one,
check it, close it, open the next, etc, scrolling down all the time. I was
wondering if there was any way, by use of macros or otherwise, that i could
open all the links together automatically so i wouldnt have to keep going
back to excel. Any help anyone can give me would be very much appreciated.
Thanks!


StinkeyPete

The code worked for me fine. This code assumes that your hyperlinks are in
column in rows 1 through 10. Where are your hyperlinks located in your
spreadsheet?

"Frazer" wrote:

Ive done all that but its not working......I think all thats happening is
that each cell is being selected, but i need the hyperlink to open, which is
not happening at the moment. I have copied all the code exactly so i dont
think that is the problem.....any more ideas??

"StinkeyPete" wrote:

This is a quick and dirty way to do it:

Sub Macro1()
'You will need to adjust the Range("A1:A10") to include your entire list.

Dim cnt As Integer
cnt = 1

For Each c In Worksheets("Sheet1").Range("A1:A10").Cells
Range("A" & cnt).Select
On Error Resume Next
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
cnt = cnt + 1
Next

End Sub

"Frazer" wrote:

oh and i should also mention that clicking on the links whilst recording a
macro does not work- this simply selects the cell rather than clicking the
link

"Frazer" wrote:

Hi, im not too great at excel so was wondering if anyone out there could help
me.
I cant really say what this is actually for, but ill give you the main idea.
Every day, i generate a long list of hyperlinks in excel which i have to open
and check. Obviously as there are so many, it takes a long time to open one,
check it, close it, open the next, etc, scrolling down all the time. I was
wondering if there was any way, by use of macros or otherwise, that i could
open all the links together automatically so i wouldnt have to keep going
back to excel. Any help anyone can give me would be very much appreciated.
Thanks!


Frazer

There in sheet 3, cells C1:C70


I changed all the code to correcpond with this though.....

What exactly happens when you run your macro? Could it be that some of my
settings are not correct??

"StinkeyPete" wrote:

The code worked for me fine. This code assumes that your hyperlinks are in
column in rows 1 through 10. Where are your hyperlinks located in your
spreadsheet?

"Frazer" wrote:

Ive done all that but its not working......I think all thats happening is
that each cell is being selected, but i need the hyperlink to open, which is
not happening at the moment. I have copied all the code exactly so i dont
think that is the problem.....any more ideas??

"StinkeyPete" wrote:

This is a quick and dirty way to do it:

Sub Macro1()
'You will need to adjust the Range("A1:A10") to include your entire list.

Dim cnt As Integer
cnt = 1

For Each c In Worksheets("Sheet1").Range("A1:A10").Cells
Range("A" & cnt).Select
On Error Resume Next
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
cnt = cnt + 1
Next

End Sub

"Frazer" wrote:

oh and i should also mention that clicking on the links whilst recording a
macro does not work- this simply selects the cell rather than clicking the
link

"Frazer" wrote:

Hi, im not too great at excel so was wondering if anyone out there could help
me.
I cant really say what this is actually for, but ill give you the main idea.
Every day, i generate a long list of hyperlinks in excel which i have to open
and check. Obviously as there are so many, it takes a long time to open one,
check it, close it, open the next, etc, scrolling down all the time. I was
wondering if there was any way, by use of macros or otherwise, that i could
open all the links together automatically so i wouldnt have to keep going
back to excel. Any help anyone can give me would be very much appreciated.
Thanks!


StinkeyPete

Right click on sheet3 and click view code. Then copy and paste this code and
the run the macro (ToolsMacroMacros.



Sub Macro1()
Dim cnt As Integer
cnt = 1

For Each c In Worksheets("Sheet1").Range("C1:C70").Cells
Range("C" & cnt).Select
On Error Resume Next
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
cnt = cnt + 1
Next

End Sub







"Frazer" wrote:

There in sheet 3, cells C1:C70


I changed all the code to correcpond with this though.....

What exactly happens when you run your macro? Could it be that some of my
settings are not correct??

"StinkeyPete" wrote:

The code worked for me fine. This code assumes that your hyperlinks are in
column in rows 1 through 10. Where are your hyperlinks located in your
spreadsheet?

"Frazer" wrote:

Ive done all that but its not working......I think all thats happening is
that each cell is being selected, but i need the hyperlink to open, which is
not happening at the moment. I have copied all the code exactly so i dont
think that is the problem.....any more ideas??

"StinkeyPete" wrote:

This is a quick and dirty way to do it:

Sub Macro1()
'You will need to adjust the Range("A1:A10") to include your entire list.

Dim cnt As Integer
cnt = 1

For Each c In Worksheets("Sheet1").Range("A1:A10").Cells
Range("A" & cnt).Select
On Error Resume Next
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
cnt = cnt + 1
Next

End Sub

"Frazer" wrote:

oh and i should also mention that clicking on the links whilst recording a
macro does not work- this simply selects the cell rather than clicking the
link

"Frazer" wrote:

Hi, im not too great at excel so was wondering if anyone out there could help
me.
I cant really say what this is actually for, but ill give you the main idea.
Every day, i generate a long list of hyperlinks in excel which i have to open
and check. Obviously as there are so many, it takes a long time to open one,
check it, close it, open the next, etc, scrolling down all the time. I was
wondering if there was any way, by use of macros or otherwise, that i could
open all the links together automatically so i wouldnt have to keep going
back to excel. Any help anyone can give me would be very much appreciated.
Thanks!


Frazer

Ive done that exactly and still no luck....maybe its something wrong with my
settings, i dunno, but thanks for the help anyway

"StinkeyPete" wrote:

Right click on sheet3 and click view code. Then copy and paste this code and
the run the macro (ToolsMacroMacros.



Sub Macro1()
Dim cnt As Integer
cnt = 1

For Each c In Worksheets("Sheet1").Range("C1:C70").Cells
Range("C" & cnt).Select
On Error Resume Next
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
cnt = cnt + 1
Next

End Sub







"Frazer" wrote:

There in sheet 3, cells C1:C70


I changed all the code to correcpond with this though.....

What exactly happens when you run your macro? Could it be that some of my
settings are not correct??

"StinkeyPete" wrote:

The code worked for me fine. This code assumes that your hyperlinks are in
column in rows 1 through 10. Where are your hyperlinks located in your
spreadsheet?

"Frazer" wrote:

Ive done all that but its not working......I think all thats happening is
that each cell is being selected, but i need the hyperlink to open, which is
not happening at the moment. I have copied all the code exactly so i dont
think that is the problem.....any more ideas??

"StinkeyPete" wrote:

This is a quick and dirty way to do it:

Sub Macro1()
'You will need to adjust the Range("A1:A10") to include your entire list.

Dim cnt As Integer
cnt = 1

For Each c In Worksheets("Sheet1").Range("A1:A10").Cells
Range("A" & cnt).Select
On Error Resume Next
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
cnt = cnt + 1
Next

End Sub

"Frazer" wrote:

oh and i should also mention that clicking on the links whilst recording a
macro does not work- this simply selects the cell rather than clicking the
link

"Frazer" wrote:

Hi, im not too great at excel so was wondering if anyone out there could help
me.
I cant really say what this is actually for, but ill give you the main idea.
Every day, i generate a long list of hyperlinks in excel which i have to open
and check. Obviously as there are so many, it takes a long time to open one,
check it, close it, open the next, etc, scrolling down all the time. I was
wondering if there was any way, by use of macros or otherwise, that i could
open all the links together automatically so i wouldnt have to keep going
back to excel. Any help anyone can give me would be very much appreciated.
Thanks!


StinkeyPete

Use this code instead....

Sub Macro1()
Dim cnt As Integer
cnt = 1

For Each c In Worksheets("Sheet3").Range("C1:C70").Cells
Range("C" & cnt).Select
On Error Resume Next
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
cnt = cnt + 1
Next

End Sub


"StinkeyPete" wrote:

Right click on sheet3 and click view code. Then copy and paste this code and
the run the macro (ToolsMacroMacros.



Sub Macro1()
Dim cnt As Integer
cnt = 1

For Each c In Worksheets("Sheet1").Range("C1:C70").Cells
Range("C" & cnt).Select
On Error Resume Next
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
cnt = cnt + 1
Next

End Sub







"Frazer" wrote:

There in sheet 3, cells C1:C70


I changed all the code to correcpond with this though.....

What exactly happens when you run your macro? Could it be that some of my
settings are not correct??

"StinkeyPete" wrote:

The code worked for me fine. This code assumes that your hyperlinks are in
column in rows 1 through 10. Where are your hyperlinks located in your
spreadsheet?

"Frazer" wrote:

Ive done all that but its not working......I think all thats happening is
that each cell is being selected, but i need the hyperlink to open, which is
not happening at the moment. I have copied all the code exactly so i dont
think that is the problem.....any more ideas??

"StinkeyPete" wrote:

This is a quick and dirty way to do it:

Sub Macro1()
'You will need to adjust the Range("A1:A10") to include your entire list.

Dim cnt As Integer
cnt = 1

For Each c In Worksheets("Sheet1").Range("A1:A10").Cells
Range("A" & cnt).Select
On Error Resume Next
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
cnt = cnt + 1
Next

End Sub

"Frazer" wrote:

oh and i should also mention that clicking on the links whilst recording a
macro does not work- this simply selects the cell rather than clicking the
link

"Frazer" wrote:

Hi, im not too great at excel so was wondering if anyone out there could help
me.
I cant really say what this is actually for, but ill give you the main idea.
Every day, i generate a long list of hyperlinks in excel which i have to open
and check. Obviously as there are so many, it takes a long time to open one,
check it, close it, open the next, etc, scrolling down all the time. I was
wondering if there was any way, by use of macros or otherwise, that i could
open all the links together automatically so i wouldnt have to keep going
back to excel. Any help anyone can give me would be very much appreciated.
Thanks!


Frazer

Yes!! Thanks a LOT man you're a huge help!!!

"Frazer" wrote:

Hi, im not too great at excel so was wondering if anyone out there could help
me.
I cant really say what this is actually for, but ill give you the main idea.
Every day, i generate a long list of hyperlinks in excel which i have to open
and check. Obviously as there are so many, it takes a long time to open one,
check it, close it, open the next, etc, scrolling down all the time. I was
wondering if there was any way, by use of macros or otherwise, that i could
open all the links together automatically so i wouldnt have to keep going
back to excel. Any help anyone can give me would be very much appreciated.
Thanks!



All times are GMT +1. The time now is 09:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com