Results 1 to 4 of 4

Thread: Pregunta de un Ignorante
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Dec 2006
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Pregunta de un Ignorante

    Tengo en un ṃdulo lo sig.

    If ActiveSheet.Range("C1") > 120 Then
    ActiveSheet.Range("A1:A8").Clear = True
    End If

    Al correrlo si borra el rango indicado paro me marca error.

  2. #2
    Board Regular galileogali's Avatar
    Join Date
    Oct 2005
    Location
    Quiroga, Argentine
    Posts
    748
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Proba esto:

    If ActiveSheet.Range("C1") > 120 Then
    ActiveSheet.Range("A1:A8").Clear
    End If

    clear no lleva true.

    GALI

  3. #3
    MrExcel MVP Greg Truby's Avatar
    Join Date
    Jun 2002
    Location
    39° 17' 15" N, -94° 40' 26" W
    Posts
    9,999
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Default

    Note que .Clear borra todo, incluyendo formatos y borders (¿fronteras? ¿líneas?). Si desea borrar solamente el contenido y dejar los formatos, use .ClearContents

    Atte,
    Greg
    ………………………………………………
    Home: XL 2003, 2007, 2010, and 2013 on Windows 7
    Work: XL 2013, 2016 on Windows 10
    Please use CODE tags - especially for longer excerpts of code.

  4. #4
    New Member
    Join Date
    Dec 2006
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    gracias a ambos

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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