Well done James.
For future reference, you should make sure you dimension your variables separately:
Dim X as Long
Dim Y as Long
X is not set as Long in your code. It defaults to variant if not explicitly set
try this to test:
Dim X as Long
Dim Y as Long
msgbox "X = " & typeName(X) & vbnewline & "Y = " & typeName(Y)
Dim X, Y as Long
msgbox "X = " & typeName(X) & vbnewline & "Y = " & typeName(Y)
The first message box should tell you that X is Long while the second should say that it is "empty".
Also you don't need the empty string here:
"FINDER;file:///G:/a326/ICStock(" & CStr(X) & ").asp", Destination:=Range("A" & CStr(y) & ""))
Can be:
"FINDER;file:///G:/a326/ICStock(" & CStr(X) & ").asp", Destination:=Range("A" & CStr(y)))