Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 788
Default Error Message "Runtime error '13' Type mismatch"

For some reason my program isn't working. In the excel sheet, I have a user
click on a button to open a userform.

Now when that button is clicked, a user gets

Runtime error '13'
Type Mismatch

I click on Debug and it goes to

Sub Show()
UserForm1.Show
End Sub

I have no idea why its doing this all of a sudden. Does anyone else?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Error Message "Runtime error '13' Type mismatch"

It is likely that there is something in the userform's _Initialize event that
is causing the problem- the debugger will confusingly point to the
Userform.Show line in this case. Click the Step Into debug button and keep
stepping through until you find the line that is causing the issue.

Cheers,
Dave

"Chris" wrote:

For some reason my program isn't working. In the excel sheet, I have a user
click on a button to open a userform.

Now when that button is clicked, a user gets

Runtime error '13'
Type Mismatch

I click on Debug and it goes to

Sub Show()
UserForm1.Show
End Sub

I have no idea why its doing this all of a sudden. Does anyone else?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Error Message "Runtime error '13' Type mismatch"

If could be that some code in the userform is causing the error. This could
be because the code was altered or data that the code was using has now
changed.

--
Regards,
Tom Ogilvy


"Chris" wrote:

For some reason my program isn't working. In the excel sheet, I have a user
click on a button to open a userform.

Now when that button is clicked, a user gets

Runtime error '13'
Type Mismatch

I click on Debug and it goes to

Sub Show()
UserForm1.Show
End Sub

I have no idea why its doing this all of a sudden. Does anyone else?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Error Message "Runtime error '13' Type mismatch"

In the VBA Editor, go to the Tools menu, choose Options, then the General
tab. There, select the "Break In Class Module" option in the "Error
Trapping" frame. Now run your code. It will break on the actual line of code
that is causing the problem.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com
(email address is on the web site)

"Chris" wrote in message
...
For some reason my program isn't working. In the excel sheet, I have a
user
click on a button to open a userform.

Now when that button is clicked, a user gets

Runtime error '13'
Type Mismatch

I click on Debug and it goes to

Sub Show()
UserForm1.Show
End Sub

I have no idea why its doing this all of a sudden. Does anyone else?



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 788
Default Error Message "Runtime error '13' Type mismatch"

Thanks I was able to find out the problem doing that. Somehow the sheet got
changed.

New problem.... Trying to copy info in a cell, copy it, paste in a new
sheet, and then delete from the original sheet. Again it works then stops.
Below is the full code the line that it stops at is
Sheet1.Range("A" & found & ":G" & found).Select


Private Sub CommandButton10_Click()

'Copy Serial Number for deletation and paste into new spreadsheet

test_row = 2
test_value = Sheet1.Range("A" & test_row).Value

While test_value < ""
If test_value = UserForm1.ComboBox11.Value Then
found = test_row
GoTo leaveloop1
End If
test_row = test_row + 1
test_value = Sheet1.Range("A" & test_row).Value
Wend

leaveloop1:
test_row2 = 1
test_value2 = Sheet3.Range("A" & test_row2).Value

While test_value2 < ""
test_row2 = test_row2 + 1
test_value2 = Sheet3.Range("A" & test_row2).Value
Wend

Sheet1.Range("A" & found & ":G" & found).Copy
Sheet3.Range("A" & test_row2).PasteSpecial

UserForm1.ComboBox11.Clear
UserForm1.ComboBox12.Clear

Sheet1.Range("A" & found & ":G" & found).Select
Application.CutCopyMode = xlCut
Selection.Delete Shift:=xlUp

ComboBoxRefresh

End Sub

"Chip Pearson" wrote:

In the VBA Editor, go to the Tools menu, choose Options, then the General
tab. There, select the "Break In Class Module" option in the "Error
Trapping" frame. Now run your code. It will break on the actual line of code
that is causing the problem.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com
(email address is on the web site)

"Chris" wrote in message
...
For some reason my program isn't working. In the excel sheet, I have a
user
click on a button to open a userform.

Now when that button is clicked, a user gets

Runtime error '13'
Type Mismatch

I click on Debug and it goes to

Sub Show()
UserForm1.Show
End Sub

I have no idea why its doing this all of a sudden. Does anyone else?




Reply
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
Error Handling to mitigate "Run Time Erorr 13 Type Mismatch" ExcelMonkey Excel Programming 3 October 16th 05 01:56 PM
Run-time Error "13" - File Type Mismatch brentm Excel Programming 1 February 10th 05 05:09 PM
"FIND" generates "Type mismatch" error quartz[_2_] Excel Programming 5 November 16th 04 03:29 PM
Copying data to another worksheet gives "Type Mismatch" error TB[_3_] Excel Programming 6 July 28th 03 12:44 PM


All times are GMT +1. The time now is 05:31 AM.

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

About Us

"It's about Microsoft Excel"