Consulting

Results 1 to 3 of 3

Thread: Delete a personal sheet

  1. #1

    Delete a personal sheet

    Hi, good nigth. In this topic its possible to create a personal sheet. My question: Its possible to deleea this sheet by code VBA?

    Link topic create a personal sheet:
    http://www.vbaexpress.com/kb/getarticle.php?kb_id=885

    tks very much.
    Last edited by Felipe Dasi; 05-11-2009 at 05:59 PM.

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Based on that code
    [VBA]
    Sub KillPersonal()
    Dim FSO As Object, Folder As Object

    Set FSO = CreateObject("Scripting.FileSystemObject")
    Set Folder = FSO.GetFolder(Application.StartupPath)

    Workbooks("PERSONAL.XLS").Close False
    Kill Folder & "\personal.xls"
    End Sub
    [/VBA]
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  3. #3
    thanks mdmackillop.

Posting Permissions

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