msg box

S

sip8316

I used the following code with a command button so that a msg box would pop
up and prompt the user to select yes or no, and then call upon another macro
if yes is chosen. However nothing happens when I click yes or no. Below is
my code and thanks for any help

Scott

Private Sub cmdColors_Click()
Dim Msg, Style, Title, Response, MyString

cmdColors.Enabled = False

Msg = "Depending on the size of the spreadsheet and the speed of your
computer this action may take 1 to 5 min. to complete. Do you want to
continue?"
Style = vbYesNo + vbDefaultButton1
Title = "MsgBox Continue"

Reponse = MsgBox(Msg, Style, Title)
If Response = vbYes Then
Call BorderStandard
Else

End If

cmdColors.Enabled = True
End Sub
 
D

donna.gough

Scott,

Reponse = MsgBox(Msg, Style, Title) ....Response is spelt wrong.
Are you using Option Explicit?
 
T

Toppers

Hi,
Could it be the simple typo in your code:


Reponse = MsgBox(Msg, Style, Title) instead of

ReSponse = MsgBox(Msg, Style, Title)

.... worked OK for me (with change).


HTH
 
S

sip8316

Thanks Guys,

I hate it when I do that. I don't know how many times I looked it over and
missed that

Scott
 
H

Harald Staff

Put
Option Explicit
on top of all your modules, and the VB editor will tell you those things.

HTH. Best wishes Harald
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top