Hi everyone,

I have a personal.xlsb file that opens whenever I open an excel file. It has some macros stored but nothing related to this case I will explain.

On my "main" file, I have a workbook_open that calls a user form.

Ever since I have the personal.xlsb, that user form does not show when I open the file like it used to do.

The userform works if I run it from inside the VBA window.

What do I need to change?

Here's the code to call the userform and the userform code itself:

Private Sub Workbook_Open()

Unload UserForm2
UserForm2.Show

End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
  If CloseMode = 0 Then
    Cancel = True
  End If
End Sub
Private Sub UserForm_Initialize()

Dim ws As Worksheet
Set ws = Worksheets("Settings")
Me.ComboBoxUser.List = ws.Range(ws.Cells(14, 14), ws.Cells(14, 14).End(xlDown)).Value

End Sub
Private Sub OKbutton_click()

Dim user_range As Range
Dim price_path As Variant
Dim platts_path As Variant
Dim ws As Worksheet
Set ws = Worksheets("Settings")

Set user_range = ws.Range(ws.Cells(14, 14), ws.Cells(ws.Cells(14, 14).End(xlDown).Row, ws.Cells(14, 14).End(xlToRight).Column))
price_path = Application.VLookup(ComboBoxUser.Value, user_range, 2, False)
platts_path = Application.VLookup(ComboBoxUser.Value, user_range, 3, False)
font_letter = Application.VLookup(ComboBoxUser.Value, user_range, 4, False)
font_size = Application.VLookup(ComboBoxUser.Value, user_range, 5, False)
font_color = Application.VLookup(ComboBoxUser.Value, user_range, 6, False)

ws.Cells(7, 15) = price_path
ws.Cells(8, 15) = platts_path
ws.Cells(9, 15) = font_letter
ws.Cells(10, 15) = font_size
ws.Cells(11, 15) = font_color


Unload Me

End Sub
Private Sub Cancelbutton_click()

Unload Me

End Sub
Thank you.