Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I had the following code in a VBA which, when I opened the Workbook showed
Error '13' - Type mismatch, I believe relating to the Set c = Range("M7:M20") line. I exited the error and it would function ok. Private Sub Worksheet_Calculate() Set c = Range("M7:M20") For Each i In c If i.Value = "Yes" Then i.Value = i.Value End If Next End Sub But now, the line in the code has changed itself back to Set c = Range("M7") which was the range we had in an earlier code, and obviously only works on cell M7. I can change the "M7" to "M8" etc, but as soon as I try to change the range back to ("M7:M20") as I need it, Excel and the VBA freeze. Does anyone know how I may overcome this? -- Cheers cliff18 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do I correct a "run time error 1004-unable to open" problem? | Excel Programming | |||
Unable to get a correct total when changing data within a formula | Excel Worksheet Functions | |||
Please correct for me this code | Excel Programming | |||
Please correct for me this code | Excel Programming | |||
Please Help Correct my code | Excel Programming |