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: 360
Default #13 type mismatch error on user form

This form as 3 option buttons with procedures. It has a cancel and okay.
The user clicks each option button and it runs the procedures. The 3rd
option button requires the option click and the okay button and it should
close the form.

When I run this form it stops at the Fprocess1 = True & Fprocess2 = True &
Fprocess3 = True Then Unload Me line.

I thought the cancel button should be able to clear out of everything?

For the last option button I have to click option plus okay. It would be
better if I clicked the last option button and it did its thing then I pushed
okay and it closed. How can I change to do this?

However as it stands now when I run this form I get this error message:
At this point I get a Run time error #13 type mismatch.
All the macros in all the subs run without an error.

I would really like the cancel button to be able to close out anywhere in
the process as an alternative.
Thanks,
Private Sub cmdOkay_Click()
If Fprocess1 = True & Fprocess2 = True & Fprocess3 = True Then Unload Me


Private Sub cmdCancel_Click()
Unload Me
End Sub

-------------these are my three option buttons that when clicked do a series
of macros
Private Sub ReformatDepts_Click()
Fprocess3 = False
If optReformatDepts.Value = True Then
Call SSPproject.ReformatDepts.SortDivDept
Call SSPproject.ReformatDepts.HideCellsNtoX
End If
Fprocess3 = True
End Sub


Private Sub optCkforDupes_Click()
Dim nResult As Long
Fprocess1 = False
If optCkforDupes.Value = True Then
nResult = MsgBox(prompt:="From: " & frRptDate & vbNewLine & "To: " &
toRptDate, Buttons:=bvOKCancel, Title:="report Date")
End If
If nResult = vbOK Then
Call createXLdb1.deleteDateRow1
Call createXLdb1.CkforDupes
End If
Fprocess1 = True
End Sub

Private Sub optSaveIndesign_Click()
Fprocess2 = False
If optSaveIndesign.Value = True Then
Call saveIndesign.saveIndesign
End If
Fprocess2 = True
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
#13 type mismatch error on user form for Dave Peterson Janis Excel Discussion (Misc queries) 5 January 17th 08 07:35 PM
Type Mismatch: array or user defined type expected ExcelMonkey Excel Programming 4 July 6th 06 03:40 PM
Help: Compile error: type mismatch: array or user defined type expected lvcha.gouqizi Excel Programming 1 October 31st 05 08:20 PM
Type mismatch error on form show Darach Excel Programming 1 October 26th 05 12:51 PM


All times are GMT +1. The time now is 04:51 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"