-
72 ¿Te parecen útiles los tips de las funciones? (ver tema completo)
-
1. ¿Te parecen útiles los tips de las funciones?
-
Sí
-
No
-
Ni me he fijado en ellos
-
- Please sign in or register to vote in this poll.
- View topic
-
-
Current Donation Goals
-
Mantenimiento de la comunidad
-
-
Files
-
-
Download Statistics
-
Files170
-
Comments89
-
Reviews26
-
-
Posts
-
Prueba y comenta Sub copiar_hojamc() Dim actual As Workbook Dim LibroDestino As Workbook Dim nuevaHoja As Worksheet Dim nombre As String Dim ruta As String Set actual = ThisWorkbook nombre = actual.Sheets("Lista").Range("A2").Value ruta = actual.Path On Error Resume Next Set LibroDestino = Workbooks.Open(ruta & "\" & "LibroDestino.xlsx") On Error GoTo 0 If LibroDestino Is Nothing Then Set LibroDestino = Workbooks.Add LibroDestino.SaveAs ruta & "\" & "LibroDestino.xlsx" End If Dim hojaExistente As Boolean hojaExistente = False For Each hoja In LibroDestino.Sheets If hoja.Name = nombre Then hojaExistente = True Exit For End If Next hoja If hojaExistente Then nombre = InputBox("La hoja con el nombre '" & nombre & "' ya existe en el LibroDestino. Por favor, introduce un nuevo nombre:", "Nombre duplicado") End If Set nuevaHoja = LibroDestino.Sheets.Add(After:=LibroDestino.Sheets(LibroDestino.Sheets.Count)) actual.Sheets("Lista").UsedRange.Copy nuevaHoja.Paste nuevaHoja.Name = nombre Application.CutCopyMode = False LibroDestino.Save LibroDestino.Close False actual.Activate MsgBox "El contenido de la hoja Lista se ha copiado al LibroDestino con el nombre " & nombre End Sub
-
Muchas gracias, no puedo haber sido mas **maravilloso**!!
-
By torquemada · Posted
Hola a todos. Para los que no poseen Excel 365. Saludos. Horas trabajadas_tor.xlsx
-
-
Recently Browsing
- No registered users viewing this page.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.