i have a vbscript that outputs some data into an excel spreadsheet which is created by the script itself.
What I am trying to do is provide a way for the use to search that spreadsheet by bringing up the find dialog.
I've tried adding a button to the sheet
objXL.ActiveSheet.Buttons.Add(303.75, 16.5, 60, 20).Select
objXL.Selection.Characters.Text = "Search"
objXL.Selection.OnAction = ????? ' has to be a macro in the sheet and as the sheet 'is generated by the script, can't see how I can use this method
and assign a function elsewhere in the script to its onAction but this doesn't work.
I know all the user has to do it hit CTRL+F if they want to search, but it would be useful to provide a search button actually on the sheet as its created by the script.
Does anyone have any ideas how to do this please?