Consulting

Results 1 to 5 of 5

Thread: Solved: Lost Workbook

  1. #1

    Solved: Lost Workbook

    Ok I don't know what happened. I don't even know how to Hide objects in VBA but somehow my entire workbook disappeared. I have a button from another workbook I was trying to copy over, I accidently launched the code and it did something crazy. Now my excel window has nothing but the main toolbar and nothing else.

    Does anyone have a script to restore the window? Set.Normal or Window.show I tried a bunch of things but I'm not very familar with Excel coding. Any help is appreciated, thanks in advance.

    Rich

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Post the workbook here and let's take a look and see if we can help.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    If the window has just been dragged off screen you may want to try something like the following:
    [vba] With ActiveWorkbook.Windows(1)
    .Top = 1
    .Left = 1
    .WindowState = xlMaximized
    End With[/vba]
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  4. #4
    I just had our IT team restore the file to the nightly back up version. Thanks for your responses.

  5. #5
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Tell your IT team to implement shadowcopy on your servers so you can do it yourself next time. Trust me, it's saved me a TON of time restoring from tape since I turned that feature on.
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





Posting Permissions

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