Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi all, I'd like to like to assign a number of Labels into an array, so that can use loop to change the caption of each Label. I tried testing b using object variable as follows: Dim testLabel As Label testLabel = myLabel myLabel is a Label i created in a form. but if i run the code, an erro would show that ''object variable or 'with' block variable is no defined'', which i don't understand, cos apparently testLabel i clearly defined. However, if i change it to be: Dim testLabel testLabel = myLabel it works, but testLabel is actually a string, in stead of a label, thu i'll not be able to change the caption of it. can anyone help please. it sounds easy, but i've been struggling fo days, and just can't get the syntax right. thanks All the best, Fendi -- Fendi ----------------------------------------------------------------------- Fendic's Profile: http://www.excelforum.com/member.php...fo&userid=2395 View this thread: http://www.excelforum.com/showthread.php?threadid=38998 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Runtime Error '91' Object variable or With block variable not set | Excel Discussion (Misc queries) | |||
Object Variable Not Set Error on Selection object | Excel Worksheet Functions | |||
Run-time error '91': "Object variable or With block variable not set | Excel Programming | |||
Cells.Find error Object variable or With block variable not set | Excel Programming | |||
Pivot Table - Object variable or with block variable not set? | Excel Programming |