You'll have to excuse my terminology here as I am a vbscript novice. I want create a script in a Excel 2000 document which will have a text box, allowing the user to enter a string i.e. Statement Recs and On doing so the vbscript will look at 3 columns within the same worksheet, i.e Cell E6 accross to I6, with each row going down to row 15 i.e E15 accross to I15 . Each cell will have a string i.e. Statement Recs. If the text that is typed in the text box matches any of the text in one of the columns then I want it to run the following script:
strSoundFile = "G:\IT\family fortunes\familyfortunes.wav"
Set objShell = CreateObject("Wscript.Shell")
strCommand = "sndrec32 /play /close " & Chr(34) & strSoundFile & Chr(34)
objShell.Run strCommand, 0, True
And also format that particular cell so that the text string changes colour to yellow.
If the string in the textbox i.e. Statement Recs, is not found in any of the cells then I want the following vbscript to run:
strSoundFile = "G:\IT\family fortunes\familyfortunes1.wav"
Set objShell = CreateObject("Wscript.Shell")
strCommand = "sndrec32 /play /close " & Chr(34) & strSoundFile & Chr(34)
objShell.Run strCommand, 0, True
I have managed to get this far but I don't know how to do the above. Any help would be greatly appreciated.
strSoundFile = "G:\IT\family fortunes\familyfortunes.wav"
Set objShell = CreateObject("Wscript.Shell")
strCommand = "sndrec32 /play /close " & Chr(34) & strSoundFile & Chr(34)
objShell.Run strCommand, 0, True
And also format that particular cell so that the text string changes colour to yellow.
If the string in the textbox i.e. Statement Recs, is not found in any of the cells then I want the following vbscript to run:
strSoundFile = "G:\IT\family fortunes\familyfortunes1.wav"
Set objShell = CreateObject("Wscript.Shell")
strCommand = "sndrec32 /play /close " & Chr(34) & strSoundFile & Chr(34)
objShell.Run strCommand, 0, True
I have managed to get this far but I don't know how to do the above. Any help would be greatly appreciated.