Click here to Skip to main content
15,891,204 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: VBScript for automating USB installation Pin
Dave Kreskowiak24-Nov-04 10:33
mveDave Kreskowiak24-Nov-04 10:33 
GeneralRe: VBScript for automating USB installation Pin
Anonymous24-Nov-04 13:22
Anonymous24-Nov-04 13:22 
GeneralRe: VBScript for automating USB installation Pin
Dave Kreskowiak24-Nov-04 15:29
mveDave Kreskowiak24-Nov-04 15:29 
GeneralUpdating dataadapter error Pin
ccotton33324-Nov-04 7:34
ccotton33324-Nov-04 7:34 
GeneralRemoting Problems ... Pin
Paebbels24-Nov-04 6:23
Paebbels24-Nov-04 6:23 
GeneralRe: Remoting Problems ... Pin
Paebbels25-Nov-04 9:08
Paebbels25-Nov-04 9:08 
QuestionExecute string command? Pin
sundayschool24-Nov-04 2:32
sundayschool24-Nov-04 2:32 
AnswerRe: Execute string command? Pin
Pablo.ar24-Nov-04 2:50
Pablo.ar24-Nov-04 2:50 
Scout12:
1st off, there is NO WAY to execute a command like the one you are trying...
Ok, now to the solution of your problem: What you really have is an array of controls... ever heard of that? You have a full set of controls, that are all of the same class, and mostly, do the same thing. So, the best way to go is, "Name them all the same, and distinguish them by an identifying number within the 'name' definition". If you know nothing about working with arrays, you better start studying about it, because it is an actual codeing standard procedure, valuable for any programming language.
Now, concretely, you must select all the command buttons and:

  • At the name property, put "cmdMassReCaption"
  • At the index property, put numbers 0...39
  • and on the form_load, use a For...Next block structure, to peruse through all the controls that are part of the array:

    For i = 0 To 39
       cmdMassReCaption(i).Caption = lstTheNamingList.List(i)
    Next i

    So, you'll access every single one of the command buttons by using the same name for each of them, but you will also use a unique (i) indexing number.
    Well, hope this is an immediate solution to your problem with buttons, but I profusely suggest you start studying about arrays, it's something you just cant't miss.
    Kindly, Pablo.


    -----------------------------------------------------------------------------
    We live to code, this is our religion.
    GeneralRe: Execute string command? Pin
    sundayschool24-Nov-04 6:40
    sundayschool24-Nov-04 6:40 
    GeneralRe: Execute string command? Pin
    Dennis C. Dietrich24-Nov-04 7:03
    Dennis C. Dietrich24-Nov-04 7:03 
    GeneralRe: Execute string command? Pin
    Dave Kreskowiak24-Nov-04 10:26
    mveDave Kreskowiak24-Nov-04 10:26 
    GeneralRe: Execute string command? Pin
    Pablo.ar25-Nov-04 2:39
    Pablo.ar25-Nov-04 2:39 
    GeneralRe: Execute string command? Pin
    Dave Kreskowiak25-Nov-04 5:14
    mveDave Kreskowiak25-Nov-04 5:14 
    GeneralRe: Execute string command? Pin
    Dennis C. Dietrich25-Nov-04 5:56
    Dennis C. Dietrich25-Nov-04 5:56 
    QuestionQuery Parser in VB? Pin
    .NetRams24-Nov-04 0:49
    .NetRams24-Nov-04 0:49 
    AnswerRe: Query Parser in VB? Pin
    Steven Campbell24-Nov-04 14:46
    Steven Campbell24-Nov-04 14:46 
    GeneralRe: Query Parser in VB? Pin
    J4amieC25-Nov-04 4:12
    J4amieC25-Nov-04 4:12 
    GeneralRe: Query Parser in VB? Pin
    Steven Campbell25-Nov-04 4:54
    Steven Campbell25-Nov-04 4:54 
    QuestionSystem-wide CBT Hook in .NET? Pin
    Hadi Fakhreddine23-Nov-04 23:01
    Hadi Fakhreddine23-Nov-04 23:01 
    GeneralNetware Purge command Pin
    Ranoush23-Nov-04 21:13
    Ranoush23-Nov-04 21:13 
    GeneralRe: Netware Purge command Pin
    Dave Kreskowiak24-Nov-04 1:37
    mveDave Kreskowiak24-Nov-04 1:37 
    GeneralRe: Netware Purge command Pin
    Ranoush26-Nov-04 19:53
    Ranoush26-Nov-04 19:53 
    GeneralRe: Netware Purge command Pin
    Dave Kreskowiak27-Nov-04 1:37
    mveDave Kreskowiak27-Nov-04 1:37 
    QuestionSilent installation? Pin
    charleslau285523-Nov-04 20:44
    charleslau285523-Nov-04 20:44 
    AnswerRe: Silent installation? Pin
    Ranoush23-Nov-04 21:26
    Ranoush23-Nov-04 21:26 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.