code by firefytr

d0wnt0wn

Well-known Member
Joined
Oct 28, 2002
Messages
771
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
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Would you want it to prompt on opening for the sheet?

But really how much effort's saved by answering a prompt, or having to remember to click a tickbox, as opposed to just switching sheets?
 
Upvote 0
first you would have to understand just how pathetic our estimators are when it comes to using computers :Op changing sheets to them would mean the end of the world heheh

the check box that i would like could be checked or unchecked then saved so if you were a shingle estimator you could check it once and leave it there and it would always open that way for you... but if you were a flat estimator then you could have it always open to the flat sheet
 
Upvote 0

Forum statistics

Threads
1,214,965
Messages
6,122,496
Members
449,089
Latest member
Raviguru

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top