Visual Basic para Aplicaciones - error al copiar archivos

Life is soft - evento anual de software empresarial
 
Vista:

error al copiar archivos

Publicado por JUANMA (2 intervenciones) el 25/11/2016 12:38:06
Hola ... necesito ayuda con una macro .. quiero copiar de un libro que selecciono con getopenfilename una celda al libro que tengo abierto ... pero me dice calificador no valido ¿?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Sub Copiar_en_otro_libro()
 
 Dim Libro_Inicial As Workbook
 Dim RutaArchivo As String
 
 Set Libro_Inicial = ThisWorkbook
 
 On Error Resume Next
 
 RutaArchivo = Application.GetOpenFilename(Title:="Seleccion de Diario anterior")
 
      Workbooks.Open Filename:=RutaArchivo
 
      Libro_Inicial.Sheets("AJUSTE BODEGA").Range("h11") = RutaArchivo.Sheets("caja").Range("d18")
 
  ActiveWorkbook.Close savechanges:=False
 
End Sub
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

error al copiar archivos

Publicado por JUANMA (2 intervenciones) el 25/11/2016 13:12:47
El error me lo da en RutaArchivo de esta linea:

1
Libro_Inicial.Sheets("AJUSTE BODEGA").Range("h11") = RutaArchivo.Sheets("caja").Range("d18")
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar