List Box and personal.xls

  • Thread starter Thread starter marijan glavac
  • Start date Start date
M

marijan glavac

Hi,

I am again in big trouble.
I need to fill listbox control with data from personal.xls.
and I wrote code like this :
ListBox1.RowSource = Range(Workbooks("Personal.xls").Worksheets("Radni
Nalozi").Cells(2, 1), Workbooks("Personal.xls").Worksheets("Radni
Nalozi").Cells(KolkoIhIma, 1))

but I get - error :Type mismatic

thanks in advance,

Marijan
 
Hi Marijan,

ListBox1.RowSource = Range(Workbooks("Personal.xls").Worksheets("Radni
Nalozi").Range(Cells(2, 1), Cells(KolkoIhIma, 1))


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
thanks
but it doesn't work
I got message :
Method Cells of object '_Global faild

Marijan
 
Hi Marijan,

Sorry, didn't look closely enough. Try this

ListBox1.RowSource = "[Personal.xls]Commandbars!A2:A" & KolkoIhIma

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Oops used my example, Should be

ListBox1.RowSource = "'[Personal.xls]Radni Nalozi'!A2:A" & KolkoIhIma
--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

Bob Phillips said:
Hi Marijan,

Sorry, didn't look closely enough. Try this

ListBox1.RowSource = "[Personal.xls]Commandbars!A2:A" & KolkoIhIma

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

marijan glavac said:
thanks
but it doesn't work
I got message :
Method Cells of object '_Global faild

Marijan
 

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

Back
Top