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

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

python - Pygame screen.blit not working -

c# - Web API response xml language -