Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
publicado

Hola:

Procedimiento de "Guardar como" con comprobación de existencia del archivo a guardar.

Private Sub GuardarComo(Directorio As Variant, Libro As Variant)

Dim Objeto_Archivos As Object
Dim Lista_Archivos As Object
Dim Archivos As Object
Dim Archivo As Object
Dim Encontrado As Boolean

Set Objeto_Archivos = CreateObject("Scripting.FileSystemObject")
Set Lista_Archivos = Objeto_Archivos.GetFolder(Directorio)
Set Archivos = Lista_Archivos.Files

For Each Archivo In Archivos
If Archivo.Name = Libro Then Encontrado = True
Next

If Encontrado = True Then
MsgBox "El archivo: " & Libro & " ya existe en este directorio.", vbInformation, Directorio
Else
ActiveWorkbook.SaveAs Directorio & "\" & Libro
End If

End Sub[/CODE]

la forma de ejecutar el procedimiento:

[b]

[CODE]GuardarComo "C\MiDirectorio", "MiLibro.xls"[/CODE]

[/b]

Salu2. Antoni

Featured Replies

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.