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: 24
Default Combine macros mismatch

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
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
combine two macros puiuluipui Excel Discussion (Misc queries) 4 May 21st 09 10:30 AM
COMBINE TWO MACROS INTO ONE K[_2_] Excel Programming 10 January 4th 08 01:48 PM
Combine 2 macros into 1 Please. Steved Excel Programming 3 May 24th 07 06:29 PM
combine two macros Lisa Excel Worksheet Functions 1 July 20th 06 02:10 AM
Combine 2 Macros al007 Excel Programming 1 December 29th 05 04:57 PM


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