|
#1
|
|||
|
|||
Help using VBP automation for my projects
Guys,
I have a small script that runs in a project step to set a macro value which is used later in the build process. What I would like to do is be able to inspect a project step that is further down the list and see if it is checked before executing the rest of the script. This is what I have but it's not working out... __________________________________________________ _____________ dim sTemp dim objMacro dim prjsteps as variant for each step in prjsteps if step.Name = "Build All Platforms" then if not step.Checked then quit end if next sTemp = InputBox("Do you want to transmit ActiveX32 to the FTP site?","Transmit File","NO") if len(stemp) < 2 then Step.BuildStatus = vbldStepStatFailed else Set objMacro = vbld_TempMacros.Add("FTPActivex", sTemp) end if __________________________________________________ ___________ Its obviously not working as expected and I cannot seem to find a lead on what I am missing. Just to reiterate, I am trying to determine if a project step has been "checked" to be processed. The latter part of the script works fine. Any help is appreciated. Last edited by garyb@se.rr.com; 10-18-2012 at 05:31 PM. Reason: additional information. |
#2
|
|||
|
|||
Try something like this:
Code:
checked = True For Each s in Project.Steps(vbldStepMain) If s.Name = "Build All Platforms" Then If Not s.Checked Then checked = False Exit For End If Next If checked Then sTemp = InputBox("Do you want to transmit ActiveX32 to the FTP site?","Transmit File","NO") If Len(stemp) < 2 Then Step.BuildStatus = vbldStepStatFailed Else vbld_TempMacros.Add "FTPActivex", sTemp End If End If |
|
|