troubleshooting Question

Error 91 when executing Excel 2003 Macro opened in Internet Explorer 7

Avatar of José Perez
José PerezFlag for Chile asked on
Microsoft ExcelVisual Basic Classic
2 Comments1 Solution333 ViewsLast Modified:
I have an excel spreadsheet that works fine if i open it from my desktop or fileserver but it fails to execute if i try to open it from our Intranet, with Internet Explorer.

error'91': Object variable or With block variable not set
Sub SpinButton1_Change()
 
    Dim Url As String
 
    'Tamaño sugerido para las fotos 256 x 192
    On Error GoTo Indice
    Fila = ActiveCell.Row
    SpinButton1.Min = Cells(1, 57).Value
    Dim Foto(500)
    B = Cells(1, 55).Value
    c = 1
    
    Do While c <= Cells(1, 54).Value
    
        Foto(c) = Cells(21 + c, 16).Value
        c = c + 1
    
    Loop
    
    SpinButton1.Max = c - 1
    a = SpinButton1.Value
       
    If 20 >= Fila Then
        Fila = 21
        Range(Cells(Fila + a, 2), Cells(Fila + a, 2)).Select
        F = B + Foto(ActiveCell.Row - 21) + ".jpg"
        Image1.Picture = LoadPicture(F)
        Frame1.Caption = "Registro Nº" + Str(ActiveCell.Row - 21) + "/" + Str(c - 1)
    End If
    
    If SpinButton1.Value > Cells(1, 56).Value Then
        a = 1
    Else
        a = -1
    End If
        
    Range(Cells(Fila + a, 2), Cells(Fila + a, 2)).Select
    F = B + Foto(ActiveCell.Row - 21) + ".jpg"
    'Foto = Foto(ActiveCell.Row - 21) + ".jpg"
    'Image1.Picture = LoadPicture(F)
    'Url = "https://sa.oscar.com/livelinkdav/enterprise/MyProject/General%20Offices/Administration%20Department/Inventario%20Mobiliario/P8170142.jpg"
    Url = F
    Image1.Picture = LoadPictureUrl(Url)
    Frame1.Caption = "Registro Nº" + Str(ActiveCell.Row - 21) + "/" + Str(c - 1)
    
 
 
    
Indice:
    If Err.Number <> 0 Then
 
       MsgBox Err.Number & " " & Err.Description, 16, " Error"
 
    End If
    Cells(1, 56).Value = SpinButton1.Value
End Sub
ASKER CERTIFIED SOLUTION
José Perez

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros