|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
how to use command buttons in cyclesi've created a user form with more than 30 command buttons. for each command button i've to change its field ".caption" capturing a specific cell content. for example: in cells A1:A30 i've 30 different names. i've to associate : range("A1").value to commandbutton1.caption ...... ..... range("A30").value to commandbutton30.caption i would like to do it with a cycle (for..next, or smthg similar). the code i would like to writew down is: for every commandbutton in userform1 do commandbutton.caption=range("A1").value the problem is i've to specify the number of command button i'm workin' with so the extended code i actually use is : with userform1 commandbutton1.caption=range("A1").value ...... commandbutton30.caption=range("A30").value i would like to substitute these 30 lines of code with a single cycle/loop. thanks in advance . "C.F." <NOSPAM@freemail.it> wrote in message Then I recommend asking in microsoft.public.excel.programming. The news:MMkne.1475672$35.55065788@news4.tin.it... > i've a problem in VBE (visual basic excel). differences between full-blown VB and VBA (there is no VBE) are enough that any answers you get here may not apply to what you're doing.
Creating a DLL and calling it from an app
How to calculate this? Sudden automation error with MS XML object memory leak ? Recent File Parse and preserve an object in a class SP5 to SP6: To update or not? reading a XML file to vb variables Problem with multiple forms How do I deploy a VB6 program to folder whose filename has spaces? |
|||||||||||||||||||||||