Consulting

Results 1 to 8 of 8

Thread: Delete Sheet

  1. #1

    Delete Sheet

    I want to delete a sheet from workbook without any instructions or message box. When i try to delete the sheet it ask

    "Data may exist in the sheet(s) seletion for deletion. To permanentely delete the data, press delete."

    How can I do this?

    Thanks and Regards
    Manish Rajpal

  2. #2
    VBAX Master XLGibbs's Avatar
    Joined
    Jan 2006
    Location
    state of confusion, but vacation in denial
    Posts
    1,315
    Location
    You can disable alert messages with this

    Application.DisplayAlerts = False


    just turn it back on after the procedure.

    Hope it helps.

  3. #3
    Quote Originally Posted by Gibbs
    You can disable alert messages with this

    Application.DisplayAlerts = False


    just turn it back on after the procedure.

    Hope it helps.
    Hi,

    Thanks and it is working fine.

    Can you also tell me how can I define names for the range through VBA.

  4. #4
    VBAX Master XLGibbs's Avatar
    Joined
    Jan 2006
    Location
    state of confusion, but vacation in denial
    Posts
    1,315
    Location
    How do you mean? For using within code or a defined name for use in formulas on the sheet

    For named ranges for the workbook, adding via VBA

    ActiveWorkbook.Names.Add Name:="NamedRange",RefersToR1C1:="=Sheet1!R1C1"

    or
    ActiveWorkbook.Names.Add Name:="NamedRange", RefersTo:="=Sheet1!$A$1"

  5. #5
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location
    Now why would you cross post like that ..

    http://www.puremis.net/excel/cgi-bin...1137876493/2#2

    If you cross-post again, please leave a link to other posts.. so we don't all waste duplicated efforts.. thanks.

  6. #6

  7. #7
    VBAX Master XLGibbs's Avatar
    Joined
    Jan 2006
    Location
    state of confusion, but vacation in denial
    Posts
    1,315
    Location
    Yikes. He could at least respond to some of these. This thread is the only one with a response. He must be running out of forums by now, should be lap two coming around soon.

  8. #8
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location
    Thread has been locked.

    DO NOT CROSS POST WITHOUT A LINK OR YOUR THREAD WILL BE LOCKED. PERSIST AND YOU SHALL BE BANNED.

    Thank you.

Posting Permissions

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