Como puedo solucionar este error, tengo las variables declaradas,
le doy un msgbox y me lee el dato, tengo este codigo
'=Sub Expac()
Dim Contenido As String
Dim Columna As Long
Dim Fila As Long
Dim txt As String
Dim Anadir As String
Fila = 1
Columna = 1
For Fila = 2 To 42
For Columna = 1 To 2
With Worksheets("Exp").Cells(Fila, Columna)
If Columna = 2 Then
Contenido = Contenido & .Value & vbNewLine
Else
Contenido = Contenido & .Value & vbTab
End If
End With
Next Columna
Next Fila
'MsgBox Contenido 'muestra lo que se grabara
Dim Ruta As String
Sheets("Setup").Select
'Ruta = Worksheets("Setup").Range("B10").Value 'Este es el archivo
Ruta = Range("B10").Value 'Este es el archivo
Range("B10").Select
Anadir = Contenido
Open Ruta For Input As #1
txt = Input$(LOF(1), 1)
Close #1
Open Ruta For Output As #1
Print #1, Anadir
Print #1, txt
Close #1
End Sub
Gracias
Leer las respuestas