combobox rowsource = named range ??

M

michael.beckinsale

Hi All,

I am sure this is quite simple but l have got my 'friday its the end
of the week' head on and can't fathom it out!

Can anybody tell me why the following code is not working & how to
correct it. The form is in my 'personal.xls' file and the ranges
referred to are in the 'personal.xls' file. When l launch the form
with the 'personal.xls' window active the form populates correctly but
whenever a different window is active the form will not populate
correctly.

Private Sub UserForm_Initialize()

Dim MySheet As Worksheet
Set MySheet = ThisWorkbook.Sheets("MyFormats")
cbFontName.RowSource = MySheet.Range("MyFontName").Address
cbFontSize.RowSource = MySheet.Range("FontSize").Address
cbRowHeight.RowSource = MySheet.Range("RowHeight").Address
cbDecimal.RowSource = MySheet.Range("Decimal").Address
cbNegative.RowSource = MySheet.Range("NegativeDisplay").Address

End Sub

All help greatly appreciated

Regards

Michael
 
M

michael.beckinsale

Hi All,

Problem solved by appending (external:=True) to each code line
ending .Address

Regards

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top