Hi Everyone,
I have a short script that runs perfectly fine for copying the value from a drop-down list onto the clipboard. However, there are two selections for which I don't want this to happen:
a) When the text selected says "The result has not been chosen"
b) When the text selected says "The result is not available
I see that this would be an if-else statement, with char/string match- but I am not able to code this. If any of you could provide some help, that would be fantastic! Thanks so much!
I have a short script that runs perfectly fine for copying the value from a drop-down list onto the clipboard. However, there are two selections for which I don't want this to happen:
a) When the text selected says "The result has not been chosen"
b) When the text selected says "The result is not available
I see that this would be an if-else statement, with char/string match- but I am not able to code this. If any of you could provide some help, that would be fantastic! Thanks so much!
Code:
Sub copyOutcome()
Set outcomeData = New DataObject
outcomeData.SetText Range("a16").Value
outcomeData.PutInClipboard
End Sub