YesNo Buttons

YesNo Buttons

Anonymous
Not applicable
645 Views
6 Replies
Message 1 of 7

YesNo Buttons

Anonymous
Not applicable

Is it possible to change the default (highlighted) button to 'No' when using YesNo Buttons?

0 Likes
Accepted solutions (2)
646 Views
6 Replies
Replies (6)
Message 2 of 7

pball
Mentor
Mentor
Accepted solution

Yes, it's surprisingly simple also.

 

MsgBox("hey", vbYesNo+vbDefaultButton2, "title")

 

Check out my style edits for the Autodesk forums
pball's Autodesk Forum Style
0 Likes
Message 3 of 7

Anonymous
Not applicable

Wow! That is too freakin cool!! Thanks!!

 

0 Likes
Message 4 of 7

Anonymous
Not applicable
Accepted solution

Wow! That is too freakin cool!! Thanks!!

0 Likes
Message 5 of 7

j_weber
Mentor
Mentor

Hi, 

everytime I try buttons in a message box a get an error

 

Snag_e145f2d.png

I don't know what is wrong




Jörg Weber
CAD Systemtechniker für AutoCAD, Inventor, Vault





0 Likes
Message 6 of 7

j_weber
Mentor
Mentor

OK I think I found it because this works for me

 

Sub Test()

Dim Meldung

Meldung = MsgBox("hey", vbInformation)

End Sub

 

When I have only a Text in the messagebox I don't need a varialbe before

 




Jörg Weber
CAD Systemtechniker für AutoCAD, Inventor, Vault





0 Likes
Message 7 of 7

_dscholtes_
Advocate
Advocate

@j_weber wrote:

Hi, 

everytime I try buttons in a message box a get an error

 

Snag_e145f2d.png

I don't know what is wrong


Remove the brackets. 

0 Likes