Cool, thanks.
In my VBScript I've added this code to add a new Forms button that successfully now calls my function directly. Here is the code: -
Set= xlWB.Sheets("existingSheet").Buttons.Add(150, 50, 100, 25)
newbtn.Characters.Text = "Validate"
newbtn.OnAction = "myModule.myFunctionABC"
newbtn.Enabled = True
But how do I delete the existing ActiveX button from VBScript? This is the VBA code but it does not work in VBscript: -
xlWB.Sheets("existingSheet").Shapes("CommandButton1").Select
Selection.Cut
Bookmarks