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 autpen()
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
heres my code so far
Sub autpen()
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