LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default type mismatch

I didn't have the name of the okay button okay either. thanks,

"stevebriz" wrote:

1/ ensure you have declared boooleanflag1 to booleanflag3 as boolean
eg: Dim booleanflag1 as boolean
2/remove the spaces ...in all like this booleanflag 1= false to be
like booleanflag1
the cmd okay should have
3/ if the name ( not caption ) of your command button is Okay then
you sub should be

private sub Okay_click()

If booleanflag1= true and booleanflag2=true and booleanflag3=true then
unload me
Else
msgbox " All options must be completed before closing"
End if
End Sub

Janis wrote:
I have a user form with 3 option buttons. the flags are declared in the
declaraitons


option button1 click()
booleanflag 1= false
subproceduresXXXX
booleanflag 1 =true

option button 2 click()
booleanflag 2 =false
other subprocedures XXXX
booelanflag 2= true

option button 3 click()
booleanflag 3 = false
last procedures
booleanflag 3 = true

I have a commad button named "okay". If they click all the option then okay
it should
close but I get a type mismatch here. What should i do? All the
subprocess work. Why is it a type mismatch? THANKS,

Private Sub cmdOkay_Click()
If Flag1 = True & Flag 2 = True & Flag 3= True Then Unload Me
End Sub



 
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
Type Mismatch: array or user defined type expected ExcelMonkey Excel Programming 4 July 6th 06 03:40 PM
Type mismatch using rnge as Range with Type 8 Input Box STEVE BELL Excel Programming 11 December 3rd 05 05:02 AM
Help: Compile error: type mismatch: array or user defined type expected lvcha.gouqizi Excel Programming 1 October 31st 05 08:20 PM
type mismatch John Excel Programming 2 August 2nd 05 02:46 PM
Type Mismatch Phil Hageman[_3_] Excel Programming 2 January 9th 04 06:11 PM


All times are GMT +1. The time now is 05:45 PM.

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"