Consulting

Results 1 to 4 of 4

Thread: Borrado de datos

  1. #1

    Borrado de datos

    tengo el siguiente procedimiento que trabaja bien, ( el borrado del rango ), pero al cerrar el archivo pide confirmacion si se desea guardar los cambios,? hay manera de que los cambios se guarden en automatico, tal que no se pida confirmacion?
    Sub Auto_Open()
    Dim deadline As Date
    deadline = "05/31/07"
    If Date > deadline Then
    With Activesheet.Range("Mi Rango")
    .Clear
    End With
    End If
    End Sub
    Last edited by ojmv30; 04-14-2007 at 04:32 PM.

  2. #2
    Hi,

    I want to help too.
    Please let me know, if I am out of line!

    Here is the transalation and solution.

    "I want to save changes without excel asking me to save as."

    Try this!

    [VBA]

    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Application.ActiveWorkbook.Save

    End Sub
    [/VBA]

    Regards,
    Life is not as complicated as we think it is, we make it complicated.

    IF you can change it, then strive for excellence.
    IF not, then let it happen, don't worry about it and live a happier life.


    Let's Have Fun!
    Julio

  3. #3
    Gracias por el post, se lo agradesco mucho.
    Sorry, my english is not very good.

  4. #4
    LO QUE TIENES FUNCIONA BIEN
    TENGO OTRA SOLUCI?N, NOS? SI LE HE DADO MUCHA VUELTA PERO AHI VA
    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Application.DisplayAlerts = True
    End Sub

    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    ActiveWorkbook.Save
    Application.DisplayAlerts = False
    End Sub


    David
    PE?AFIEL

    Jos? David
    Preuvian Programer in VBA
    Yanacocha Newmont
    051 076 976988500

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •