Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error Handling to mitigate "Run Time Erorr 13 Type Mismatch" | Excel Programming | |||
Run-time Error "13" - File Type Mismatch | Excel Programming | |||
"FIND" generates "Type mismatch" error | Excel Programming | |||
Copying data to another worksheet gives "Type Mismatch" error | Excel Programming |