fire i hope you see this but i would welcome anyone elses input.... i have this code that activates and clears some data on 2 sheets upon opening.... as fire gave it to me it only did that to one sheet but i was able to adjust it for two..... the problem is.... this is one big estimating package.... sometimes i want to have it open to the shingle sheet and sometimes i want it to open to the flat roofing sheet.... i figured out that the code thats at the bottom will determine which sheet is veiwed upon opening..... i was hoping tho that there was some way that i could use a check box to select which sheet would be active upon the next opening either shingle or flat... here is the code i have now.... the arbutus.show at the end is for a splash screen i made
Option Explicit
Private Sub WORKBOOK_OPEN()
Dim i As Long
Application.ScreenUpdating = False
Sheets("flat estimates").Activate
Sheets("flat estimates").ComboBox1.Clear
Sheets("flat estimates").ComboBox1.AddItem "--Choose Estimate Type--"
For i = 1 To Sheets("flat estimates").Scenarios.Count
Sheets("flat estimates").ComboBox1.AddItem Sheets("flat estimates").Scenarios(i).Name
Next
Sheets("flat estimates").ComboBox1.ListIndex = 0
Application.ScreenUpdating = True
Sheets("flat estimates").Range("B10:B21").ClearContents
Application.ScreenUpdating = True
Application.ScreenUpdating = False
Sheets("shingle estimates").Activate
Sheets("shingle estimates").ComboBox2.Clear
Sheets("shingle estimates").ComboBox2.AddItem "--Choose Estimate Type--"
For i = 1 To Sheets("flat estimates").Scenarios.Count
Sheets("shingle estimates").ComboBox2.AddItem Sheets("shingle estimates").Scenarios(i).Name
Next
Sheets("shingle estimates").ComboBox2.ListIndex = 0
Application.ScreenUpdating = True
Sheets("shingle estimates").Range("B16:B27").ClearContents
Application.ScreenUpdating = True
ARBUTUS.show
End Sub
Option Explicit
Private Sub WORKBOOK_OPEN()
Dim i As Long
Application.ScreenUpdating = False
Sheets("flat estimates").Activate
Sheets("flat estimates").ComboBox1.Clear
Sheets("flat estimates").ComboBox1.AddItem "--Choose Estimate Type--"
For i = 1 To Sheets("flat estimates").Scenarios.Count
Sheets("flat estimates").ComboBox1.AddItem Sheets("flat estimates").Scenarios(i).Name
Next
Sheets("flat estimates").ComboBox1.ListIndex = 0
Application.ScreenUpdating = True
Sheets("flat estimates").Range("B10:B21").ClearContents
Application.ScreenUpdating = True
Application.ScreenUpdating = False
Sheets("shingle estimates").Activate
Sheets("shingle estimates").ComboBox2.Clear
Sheets("shingle estimates").ComboBox2.AddItem "--Choose Estimate Type--"
For i = 1 To Sheets("flat estimates").Scenarios.Count
Sheets("shingle estimates").ComboBox2.AddItem Sheets("shingle estimates").Scenarios(i).Name
Next
Sheets("shingle estimates").ComboBox2.ListIndex = 0
Application.ScreenUpdating = True
Sheets("shingle estimates").Range("B16:B27").ClearContents
Application.ScreenUpdating = True
ARBUTUS.show
End Sub