ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Error populating a list box (https://www.excelbanter.com/excel-programming/444741-re-error-populating-list-box.html)

PA[_2_]

Error populating a list box
 
thanks for the help. unfortunatelly your suggestion returns:

---------------------------
Microsoft Visual Basic
---------------------------
Compile error:

Method or data member not found
---------------------------
OK Help
---------------------------

Paul Robinson

Error populating a list box
 
Hi
The lack of ws reference might still be the problem. try
With ws
count = Application.count(.Range(.Cells(2, 1), .Cells(200, 1)))
Set rngSource = .Range(.Cells(2, 1), .Cells(count + 1, 2))
end With

Note the . in front of Range in both lines.

regards
Paul

On Jul 5, 2:23*pm, PA wrote:
thanks for the help. unfortunatelly your suggestion returns:

---------------------------
Microsoft Visual Basic
---------------------------
Compile error:

Method or data member not found
---------------------------
OK * Help *
---------------------------




All times are GMT +1. The time now is 07:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com