Código: Seleccionar todo
Sub Actualizar
Dim fecha, aux, liga, estado, eloc, evis, url as string
Dim part, i, gloc, gvis, lht, vht as integer
Dim hoja, celda, millocai as object
Dialoglibraries.Loadlibrary("Standard")
hoja = thiscomponent.sheets(0)
url = convertToUrl (hoja.getcellbyposition (8,0).getformula)
If FileExists (url) Then
millocai = starDeskTop.loadComponentFromUrl (Url, "_blank", 0, Array())
msgbox millocai.sheets(0).getcellbyposition (0,0).getformula
Else
msgbox "NO SE PUEDE ENCONTRAR ARCHIVO EN LA RUTA INDICADA"
End If
fecha = inputbox ("INTRODUCE LA FECHA")
part = val (inputbox ("INTRODUCE EL NUMERO DE PARTIDOS"))
for i = 1 to part
celda = hoja.getcellbyposition (0,i)
liga = celda.getformula
celda = hoja.getcellbyposition (1,i)
estado = celda.getformula
celda = hoja.getcellbyposition (3,i)
eloc = celda.getformula
celda = hoja.getcellbyposition (5,i)
evis = celda.getformula
celda = hoja.getcellbyposition (4,i)
Select case estado
Case "FT"
gloc = val (mid (celda.getformula,1,1))
gvis = val (mid (celda.getformula,3,1))
lht = val (mid (celda.getformula,6,1))
vht = val (mid (celda.getformula,8,1))
End Select
msgbox eloc & " " & evis & " " & gloc & " " & gvis & " ( " & lht & " " & vht
next
End SubSe pueden modificar celdas de otro libro sin que esté abierto?