PDA

View Full Version : Call value from worksheet



Student1000
05-19-2010, 02:26 AM
Hello,
can anyone tell me how I can work with a value in VBA that is stored in an excel spreasheet?

I want to make an If loop stating that:

If value_in_"User Data!A" & Listbox1.Listindex + 3 = 0 then
Label1.Caption = "User Data!A" & Listbox1.Listindex + 1
End If

GTO
05-19-2010, 02:59 AM
If value_in_"User Data!A" & Listbox1.Listindex + 3 = 0 then


:confused4 Maybe I am misreading this, but I do not think so. The value returned by .ListIndex should be -1 to one less that the list count. So as -1 + 3 is already 2......