Running a Userform and opening another workook at the same time

Rh_334

New Member
Joined
Jul 23, 2010
Messages
1
Im trying create a workbook that contains a sheet for every month, each sheet links to another workbook where is does a calculation base on colored cells in the source workbook. I also have a Userform that i need to start when the workbook opens. I have been able to accomplish this but i cant get it to open the source workbook at the same time, and when i do get them to run together the userform ends up open in the source workbook. How can i fix this? is there a way to open the source workbook in the background? ive tried a combo of "call auto_open and UserForm1.Show and it will either not work at all or i will end up with the linked workbook active and the userform on it. Thanks in advance

heres my code so far

Sub auto_Open()

Set wb = Workbooks.Open(Filename:="L:\Local Initiatives\ECCM\Metrics\Routes.xls")

End Sub


Private Sub ComboBox1_click()
Select Case Me.ComboBox1.Value
Case "May"
Sheets("May").Select
Case "June"
Sheets("June").Select
Case "July"
Sheets("July").Select
Case "August"
Sheets("August").Select
Case "September"
Sheets("September").Select
Case "October"
Sheets("October").Select
Case "November"
Sheets("November").Select
Case "December"
Sheets("December").Select
End Select
End Sub


Private Sub ComboBox1_Change()
Select Case ComboBox1.Value

Case "May"
Range("$A$12").Select

Case "June"
Range("$A$12").Select

End Select

End Sub




Private Sub UserForm_Activate()
With Me.ComboBox1
.AddItem "May"
.AddItem "June"
.AddItem "July"
.AddItem "August"
.AddItem "September"
.AddItem "October"
.AddItem "November"
.AddItem "December"

End With
End Sub

Private Sub commandbutton1_Click()
Unload Me
End Sub
 

Some videos you may like

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Watch MrExcel Video

Forum statistics

Threads
1,123,318
Messages
5,600,925
Members
414,416
Latest member
Nobu

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
Top