excel - Can listbox.rowsource property accept a range? -


according thread: rowsource property error vba

listbox.rowsource can accept range.

however when run

option explicit  sub test()     userform1.listbox1.rowsource = activesheet.range("a1:a2")  end sub 

i type mismatch error. please shine light on going on?

userform1.listbox1.rowsource takes string:

use this: userform1.listbox1.rowsource = activesheet.name & "!a1:a2"


Comments

Popular posts from this blog

php - Admin SDK -- get information about the group -

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -