Excel (mac) macro redirect to webpage extremely slow > HUH?!
Dear Experts,
I am running into an extremely annoying and strange problem. I hope someone can help me out with this, it drives me crazy by now! :s
I have the following macro:
Code:
Sub StuurNaarBoekhouding()
'Are you sure?
Antwoord = MsgBox("Sure?", vbOKCancel + vbExclamation, "WATCH IT!")
If Antwoord = vbCancel Then Exit Sub
'workbook save
ThisWorkbook.Save
'get modified date
Dim sLMD As String
On Error Resume Next
sLMD = ActiveWorkbook.BuiltinDocumentProperties("Last Save Time")
If Err = 440 Then
Err = 0
sLMD = "0"
' not found so ask to save
MsgBox "Not saved yet. Save it first.", vbOKOnly + vbCritical
Exit Sub
End If
'get filename
filelocation = ActiveWorkbook.FullName
'get extra info for url
Dim kostenplaats As String
kostenplaats = Worksheets("SHEETX").Range("C9:C9").Value
If kostenplaats = "" Then
MsgBox "The extra value for the url is not set, fill in first.", vbOKOnly + vbCritical
Exit Sub
End If
'create s code
Dim s As String
s = "coded_string_for_security_reasons"
'the url base
Dim url As String
url = "http://www.website.com/"
'UNTIL HERE, THE CODE WORKS FAST AS LIGHTING (tested by throwing an msgbox here)
'THE STEP DOWN HERE TAKES TWO (!!) MINUTES
'send to url
ActiveWorkbook.FollowHyperlink Address:=url + "?code=" + s + "&last_changed=" + sLMD + "&extra_info=" + kostenplaats + "&p=" + filelocation
'workbook save without saving again (so that saved last time info doesnt change)
ActiveWorkbook.Saved = True
ActiveWorkbook.Close SaveChanges:=False
End Sub
Now on windows, this piece of code works perfect. But on my mac (osx 10.8.3) office excel 2011 it does work, but the 'followhyperlink'-step takes 120 (!!) seconds to execute. This is extremely slow (on the windows it takes only 0.5 seconds or so).
What happens? How can I solve this problem?
I really hope that someone can help me out. Would be very very much appreciated!
S