Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I try combining the 2 macros below into 1 in the same sheet, the codes shown.
But I was prompted error below--- Run-time error '13':Type mismatch Sub CallMacros() Call ButtonReset_Click Call Worksheet_Calculate End Sub Private Sub Worksheet_Calculate() Dim r As Range Set r = Range("E65") If r = "pop" Then Msg = MsgBox("Joint capacity is insufficient.Re-select a bigger section size.", vbExclamation + vbOKOnly, "Rectangular Hollow Section") End Sub Sub ButtonReset_Click() If MsgBox("Are you sure you want to permanently delete the data?", _ vbQuestion + vbYesNo + vbDefaultButton, "Rectangular Hollow Section") = vbNo Then Exit Sub For Each cell In ActiveSheet.UsedRange If cell.Interior.ColorIndex = 20 Then cell.Formula = "" End If Next cell End Sub Appreciate any help on where I went wrong. Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
combine two macros | Excel Discussion (Misc queries) | |||
COMBINE TWO MACROS INTO ONE | Excel Programming | |||
Combine 2 macros into 1 Please. | Excel Programming | |||
combine two macros | Excel Worksheet Functions | |||
Combine 2 Macros | Excel Programming |