where is the mistake?

anilg0001

Rules Violation
Joined
Jun 7, 2010
Messages
193
Range("A1").Select
l = Sheets("Sheet1").Range("A" & Rows.Count).End(xlUp).Row
For l = l To 1 Step -1
With Range("A" & i)
Selection.Hyperlinks(1).Follow
End With
Next l

in my excel a1 to a20 have hyperlink
i want to open all the web pages at the same time
a1 t0 a20 is not constant
 
Hmmmm, most odd, it works for me:

I had to add a dim because I have option explicit by default but I ran this code:

Code:
Sub testing123()
Dim L As Long
For L = Sheets("Sheet1").Range("A" & Rows.Count).End(xlUp).Row To 1 Step -1
    Range("A" & L).Hyperlinks(1).Follow True
Next L
End Sub

This was in Range A1 to A3

Excel Workbook
A
1http://www.microsoft.com
2http://www.bandit.fm
3http://www.sonymusic.com
4
Sheet1
 
Upvote 0

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Made these changes and it worked fine for me.

Make sure you have "Option Explicit" entered at the top of your module, that will help you catch certain typos. To ensure it's entered automatically in future modules, in VBE>Tools>Options>Editor tab - make sure "Require Variable Declaration" is checked.

regards,

Dave

Dim l As Long
Range("A1").Select
l = Sheets("Sheet1").Range("A" & Rows.Count).End(xlUp).Row
For l = l To 1 Step -1
With Range("A" & l)
.Hyperlinks(1).Follow
End With
Next l
 
Upvote 0
I tried both of ur code and make sure VBE>Tools>Options>Editor tab - make sure "Require Variable Declaration" is checked.

but the problem is still goingon.

now i am going to try another excel
 
Upvote 0
I AM USING MOZILLA FIREFOX 5.0

my all codes are showing below

could you please find the why it not open

Option Explicit

Sub Macro1()

Dim L As Integer
Dim i As Integer
Dim M As Long

Selection.SpecialCells(xlCellTypeConstants, xlErrors + xlLogical + xlNumbers).ClearContents
Cells.Replace What:="Plastic Surgeon", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Cells.Replace What:=" mi.", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False

Columns("A:A").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.Delete Shift:=xlUp
Range("B:B").Value = Range("A:A").Value
Range("B1").Select
For i = 1 To 1000 Step 2
With Range("B" & i)
Range("B" & i).Value = ""
End With
Next i
Range("B1").Select
Selection.Delete Shift:=xlUp

Range("A1").Select
For i = 2 To 1000 Step 2
With Range("A" & i)
Range("A" & i).Value = ""
End With
Next i

Columns("A:A").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.Delete Shift:=xlUp

Columns("B:B").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.Delete Shift:=xlUp




Range("A1").Select
M = Sheets("Sheet1").Range("A" & Rows.Count).End(xlUp).Row
For M = M To 1 Step -1
With Range("A" & M)
.Hyperlinks(1).Follow
End With
Next M
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,850
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top