Userform not showing on another computer

Ruca13

Board Regular
Joined
Oct 13, 2016
Messages
85
Hello.

I have a userform that pops up when you open the file. That userform lets choose the active user, which will fill some cells with the correct file paths from the user computer.

I never had any problem with the userform, but for a colleague of mine it does not show. It is not that it is not working, because if I run through the VBA window, it works fine. The only difference I was able to see is that whenever he opens an excel file, a xlsb pops up. That file is called "Personal" (not named by him), and has others macros stored. Could be the reason of the conflitc but I would appreciate some insight on the matter.

Here is the code of the userform:

Code:
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

To open it I simply have:
Code:
Private Sub Workbook_Open()


Unload UserForm2
UserForm2.Show


End Sub

Thank you for your help.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Forum statistics

Threads
1,220,965
Messages
6,157,120
Members
451,399
Latest member
alchavar

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