Dear!!!
used this code already but not able to make it working.
What i did is:
I made a button named "cmdDeleteRcp" as per the code saying and made to it VBA exposed.
Now I made a Listbox from Microsoft form 2.0 activeX control with the name of "LstRecipeNames" as per the code saying and made to it VBA exposed.
Now when i run the runtime, i could not see any recipe in listbox
and one thing more i am getting error on the step
gActivity.Log Err.Description
but i bypassed ut by make it comment
Private Sub Display_AnimationStart()
Dim sRecipes As StringList
Dim vRecipe As Variant
On Error GoTo ErrHandler
Set sRecipes = gProject.GetComponents("Recipes;files")
For Each vRecipe In sRecipes
LstRecipeNames.AddItem vRecipe
Next vRecipe
ErrHandler:
If Err.Number Then
'gActivity.Log Err.Description
Err.Clear
End If
Set sRecipes = Nothing
Set vEachRecipe = Nothing
'Set vRecipe = Nothing
End Sub
'user selects the recipe name in the list box, and then presses delete button
Private Sub cmdDeleteRcp_Press()
On Error GoTo ErrHandler
If LstRecipeNames.ListIndex = -1 Then
MsgBox "Select a recipe to delete"
Else
'delete the recipe file, and remove from the project
gProject.DeleteComponent "Recipes;files", LstRecipeNames.Text
'remove the item from the listbox
LstRecipeNames.RemoveItem LstRecipeNames.ListIndex
End If
ErrHandler:
If Err.Number Then
'gActivity.Log Err.Description
Err.Clear
End If
End Sub
THis above code i am using.
Please tell me what is wrong in it???
The listbox is not picking list of recipes from Recipe function