
Visual basic para aplicaciones excel 2013
Publicado por Hugo (8 intervenciones) el 17/12/2014 03:03:36
Tengo un codigo para comprobara la apertura de planilla y no me funciona la funcion isfileopen
Por fabor si me pueden ayudar
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Private Sub CommandButton21_Click()
Dim objexcel As Application
Dim rutaarchivo As String
Dim texto As String
Dim final As Integer
Set objexcel = CreateObject("Excel.application")
With objexcel
rutaarchivo = ThisWorkbook.Path & ("ReciboIMP.xlsx")
If isfileopen(rutaarchivo) Then
MsgBox "el libro debe esta cerrado para proceder."
Exit Sub
Else
With .Workbooks.Open(rutaarchivo)
.Worksheets("hoja1").Range("recibo").ClearContents
End With
End If
End With
End Sub
Por fabor si me pueden ayudar
Valora esta pregunta


0