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

  • Thread starter Thread starter tweety127
  • Start date Start date
T

tweety127

hi....
why is it my excel file is always crashing?....
im adding some macros just to manipulate the way the sheets shoul
appear...and everytime i save the file...close it....then tried to ope
it....it displays an error message that excel has caused an error o
windows....i already uninstall and install the excel and still the sam
thing happen....
is there any other way to recover the file? please help m
 
I think we'll need to see the macros that have caused the problem befor
anyone will be able to help...

regards
 
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
 
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.
 
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 Su
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top