albertc30
Well-known Member
- Joined
- May 7, 2012
- Messages
- 1,091
- Office Version
- 2019
- Platform
- Windows
Hi all.
I hope everyone is well and keeping safe.
Stupid question I know, but for the life of me why is this not working? I'm rubbish at this.
My 8 year old, 9 this Saturday, has taken a keen interest on coding, bless. As such he's starting with excel as he's seen me doing a few things.
He's just got a msgbox and is playing around the yes and no side of it.
Now, my code was the following as just an example for him;
I'm getting the same answer (You clicked Yes!) regardless of whether i click yes or no.
What on earth am I doing wrong here? I'll never be good at this.
Soon enough he'll be teaching me.
As always much appreciated for all the help.
Albert
I hope everyone is well and keeping safe.
Stupid question I know, but for the life of me why is this not working? I'm rubbish at this.
My 8 year old, 9 this Saturday, has taken a keen interest on coding, bless. As such he's starting with excel as he's seen me doing a few things.
He's just got a msgbox and is playing around the yes and no side of it.
Now, my code was the following as just an example for him;
VBA Code:
Sub now02()
MsgBox "are you sure?", vbYesNo
If vbYes Then
MsgBox ("You clicked Yes!")
End If
Exit Sub
If vbNo Then
MsgBox ("You clicked No!")
Exit Sub
End If
End Sub
I'm getting the same answer (You clicked Yes!) regardless of whether i click yes or no.
What on earth am I doing wrong here? I'll never be good at this.
Soon enough he'll be teaching me.
As always much appreciated for all the help.
Albert