+ Reply to Thread
Results 1 to 5 of 5

why is it my excel file is always crashing?....

  1. #1
    Forum Contributor
    Join Date
    05-22-2006
    Posts
    103

    why is it my excel file is always crashing?....

    hi....
    why is it my excel file is always crashing?....
    im adding some macros just to manipulate the way the sheets should appear...and everytime i save the file...close it....then tried to open it....it displays an error message that excel has caused an error on windows....i already uninstall and install the excel and still the same thing happen....
    is there any other way to recover the file? please help me

  2. #2
    Registered User
    Join Date
    04-21-2006
    Posts
    61
    I think we'll need to see the macros that have caused the problem before anyone will be able to help...

    regards

    Quote Originally Posted by tweety127
    hi....
    why is it my excel file is always crashing?....
    im adding some macros just to manipulate the way the sheets should appear...and everytime i save the file...close it....then tried to open it....it displays an error message that excel has caused an error on windows....i already uninstall and install the excel and still the same thing happen....
    is there any other way to recover the file? please help me

  3. #3
    Zone
    Guest

    Re: why is it my excel file is always crashing?....


    You might could recover the file this way:

    1. Open Excel
    2. Click on File on the menubar
    3. Hold down the Shift key
    4. Click on the file name in the file list
    5. Release Shift


  4. #4
    Tom Ogilvy
    Guest

    RE: why is it my excel file is always crashing?....

    You responded positively to the previous suggestion of holding down the shift
    key.

    I assume that got you back in the file. What did you do to correct the
    problem?

    If you have done nothing, then I suggest you copy you data to another
    workbook and then start rebuilding the macros in that new workbook. Before
    moving each macro, save the workbook so you have a good copy, then test the
    additional macro and any related macros on a copy of the workbook.

    If you can't get the workbook open, then I provided a solution for that as
    well.

    --
    Regards,
    Tom Ogilvy



    "tweety127" wrote:

    >
    > hi....
    > why is it my excel file is always crashing?....
    > im adding some macros just to manipulate the way the sheets should
    > appear...and everytime i save the file...close it....then tried to open
    > it....it displays an error message that excel has caused an error on
    > windows....i already uninstall and install the excel and still the same
    > thing happen....
    > is there any other way to recover the file? please help me
    >
    >
    > --
    > tweety127
    > ------------------------------------------------------------------------
    > tweety127's Profile: http://www.excelforum.com/member.php...o&userid=34673
    > View this thread: http://www.excelforum.com/showthread...hreadid=547841
    >
    >


  5. #5
    Forum Contributor
    Join Date
    05-22-2006
    Posts
    103

    here's the source code

    below is the source code of the excel file you're asking....

    Sub OptionButton3_Click()
    ActiveWindow.SelectedSheets.Visible = False
    Sheets("EmployeeTenure").Visible = True
    Sheets("EmployeeTenure").Select
    End Sub
    Sub OptionButton5_Click()
    ActiveWindow.SelectedSheets.Visible = False
    Sheets("EmployeeResignation").Visible = True
    Sheets("EmployeeResignation").Select
    End Sub
    Sub Button9_Click()
    ActiveWindow.SelectedSheets.Visible = False
    Sheets("AddNew").Visible = True
    Sheets("AddNew").Select
    End Sub
    Sub Button10_Click()
    ActiveWindow.SelectedSheets.Visible = False
    Sheets("EmployeeDatabase").Visible = True
    Sheets("EmployeeDatabase").Select
    End Sub
    Sub Button11_Click()
    ActiveWindow.SelectedSheets.Visible = False
    Sheets("EmployeeRecord").Visible = True
    Sheets("EmployeeRecord").Select
    End Sub

    Sub Button1_Click()
    Sheets("EmployeeDatabase").Protect
    ActiveWindow.SelectedSheets.Visible = False
    Sheets("Main").Visible = True
    Sheets("Main").Select
    End Sub
    Sub EmployeeRecord_Button1_Click()
    ActiveWindow.SelectedSheets.Visible = False
    Sheets("Main").Visible = True
    Sheets("Main").Select
    End Sub
    Sub EmployeeResignation_Button1_Click()

    ActiveWindow.SelectedSheets.Visible = False
    Sheets("Main").Visible = True
    Sheets("Main").Select
    End Sub
    Sub EmployeeTenure_Button1_Click()
    ActiveWindow.SelectedSheets.Visible = False
    Sheets("Main").Visible = True
    Sheets("Main").Select
    End Sub
    Sub Button5_Click()


    Dim i As Integer
    Dim results As Integer
    results = MsgBox("Are you sure you want to add new employee?", vbQuestion, "Add New Employee")

    If results = vbOK Then

    i = 4
    Do While Worksheets("EmployeeDatabase").Range("A" & i) <> ""
    i = i + 1
    Loop
    Worksheets("EmployeeDatabase").Unprotect
    Worksheets("EmployeeDatabase").Range("A" & i) = Worksheets("AddNew").Range("G13")
    Worksheets("EmployeeDatabase").Range("B" & i) = Worksheets("AddNew").Range("G16")
    Worksheets("EmployeeDatabase").Range("C" & i) = Worksheets("AddNew").Range("G15")
    Worksheets("EmployeeDatabase").Range("D" & i) = Worksheets("AddNew").Range("G14")
    Worksheets("EmployeeDatabase").Range("E" & i) = Worksheets("AddNew").Range("G17")
    Sheets("AddNew").Select
    Range("G13:G16").Select
    Selection.ClearContents
    Range("G13").Select
    End If
    Worksheets("EmployeeDatabase").Protect
    End Sub

    Sub Button6_Click()

    End Sub
    Sub Button7_Click()
    ActiveWindow.SelectedSheets.Visible = False
    Sheets("Main").Visible = True
    Sheets("Main").Select
    End Sub
    Sub OptionButton4_Click()
    Sheets("EmployeeTraining").Visible = True
    Sheets("EmployeeTraining").Select
    End Sub
    Sub EmployeeTraining_Button1_Click()

    End Sub
    Sub Button2_Click()
    ActiveWindow.SelectedSheets.Visible = False
    Sheets("Main").Select
    End Sub
    Sub EmployeeDatabase_Button2_Click()

    ActiveWindow.SelectedSheets.Visible = False
    Sheets("main").Visible = True
    Sheets("Main").Select
    End Sub
    Sub Training_Button2_Click()

    ActiveWindow.SelectedSheets.Visible = False
    Sheets("Main").Visible = True
    End Sub
    Sub Button13_Click()
    ActiveWindow.Close

    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1