Excel2013 Hyperlink = SUBSCRIPT OUT OF RANGE

DaLiMan

Active Member
Joined
Jun 1, 2004
Messages
295
This code was working fine.
But then we moved to Excel 2013....

Why would this give an SUBSCRIPT OUT OF RANGE error?

Code:
For L = 10 To LastRow
    myDebNr = Worksheets(daWsheet).Range("A" & L).Value
    Worksheets(daWsheet).Range("A" & L).Hyperlinks(1).Address = "SomeURL"
Next
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Either daWsheet doesn't exist or there isn't a hyperlink already present in every cell of daWsheet range A10:A & lastrow.
 
Upvote 0
Either daWsheet doesn't exist or there isn't a hyperlink already present in every cell of daWsheet range A10:A & lastrow.

Hi Steve,
Nope, both are present.
Like I said, it was working fine until the 2013 move.

Even more strange is when I run the code with F8, it just works fine.....
Now how strange is that.
 
Upvote 0
Which line is it stopping on? What if you put a debug line inside the loop 'Debug.Print L'. Is the immediate window showing anything?
 
Upvote 0
Which line is it stopping on? What if you put a debug line inside the loop 'Debug.Print L'. Is the immediate window showing anything?

Man....this is painfull....
It came out that the function was giving the error somewhere half way because the data was corrupted.
So the function was stil working but there was a human failure! :oops:

Thanx for the help and putting me back on track.

Daniel
 
Upvote 0

Forum statistics

Threads
1,214,413
Messages
6,119,372
Members
448,888
Latest member
Arle8907

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