LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default why does this fail?

public sub test()
dim c as integer,s1 as string, s2 as string
s1="My Message"
s2 = "My Title"
c=msgbox(s1,vbyesno,s2)
if c=vbyes then
msgbox "hi"
else
msgbox "bye"
end if
end sub

this is always displaying "bye"

why? c (just after assignment) contains 6
at the test, c is empty

what am i missing?

it works using

if msgbox(s1,vbyesno,s2)=vbyes then ....

jooc

thanks

J

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why does hyperlink fail? Terry Pinnell[_2_] Excel Discussion (Misc queries) 4 December 7th 11 06:50 PM
Templates fail to open Geroge Setting up and Configuration of Excel 0 February 12th 07 02:58 AM
Templates Fail Brian Excel Discussion (Misc queries) 0 November 15th 06 07:18 PM
hyperlinks fail after saving Eric Lee Excel Discussion (Misc queries) 3 October 16th 06 04:46 PM
pass fail Tricia New Users to Excel 3 January 20th 05 03:45 PM


All times are GMT +1. The time now is 11:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"