combobox rowsource = named range ??
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 |
combobox rowsource = named range ??
Hi All,
Problem solved by appending (external:=True) to each code line ending .Address Regards Michael |
All times are GMT +1. The time now is 12:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com