Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Runtime error 91: Object variable or With block variable not set
My code is Private Sub ComboBox1_Change() Dim fso As Object Set fso = CreateObject("Scripting.FileSystemObject") ruta = ActiveWorkbook.Pathimagen = ComboBox1.List(ComboBox1.ListIndex) & ".jpg" ruta_e_imagen = ruta & "\FOTOS\" & imagen If fso.FileExists(ruta_e_imagen) Then Image1.Picture = LoadPicture(ruta_e_imagen) Cells.Find(What:=Replace(imagen, ".jpg", "")).Select <<----((ERROR HERE) Label3 = ActiveCell.Offset(0, 1) Label2 = ActiveCell.Offset(0, 2) Label12 = ActiveCell.Offset(0, 10) Label13 = ActiveCell.Offset(0, 11) Label14 = ActiveCell.Offset(0, 12) Label15 = ActiveCell.Offset(0, 13) Label16 = ActiveCell.Offset(0, 14) Else MsgBox "La Imagen: " & imagen & ", NO está disponible" End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
UDF doesn't work on a protected sheet in Excel 2003 | Excel Discussion (Misc queries) | |||
UDF doesn't work on a protected sheet in Excel 2003 | Excel Discussion (Misc queries) | |||
Find doesn't work if the sheet is protected | Excel Discussion (Misc queries) | |||
Macro doesn't work when sheet protected | Excel Programming | |||
Macro doesn't work on UserInterfaceOnly-protected sheet | Excel Programming |