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: 4
Default Application.Calculation gives run time error

Hallo,

In one of my VB subroutines I have included an Application.Calculation =
xlCalculationManual instruction. I normally activate this subroutine by
attaching it as a macro (Assign Macro) to a button which I have added to my
worksheet using the Forms Toolbar. This works without problems.

Now I would like to use the Control Toolbox to put a similar button on my
worksheet (I am using Excel 97). However, to this button I can not directly
assign a macro anymore (at least I don't know how), so I use the
Button_x_Click event to start my subroutine. I have added this code to my VB
sheet:

Private Sub Button_X_Click()
Call Y
End Sub

Subroutine Y is placed in a module sheet within the same workbook

Sub Y
Application.Calculation = xlCalculationManual
.. rest of code
End Sub

When I now click on the button, I get a runtime error 1004 "Method
calculation of object application failed"

Any reaction is appreciated,
Martien


 
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
I got this problem run-time error 1004 application defined ... Davide Blau Excel Discussion (Misc queries) 2 July 10th 06 09:27 PM
run-time error '1004': Application-defined or object-deifined error [email protected] Excel Programming 5 August 10th 05 09:39 PM
Application Run Time Error 1004 and Stack Error ExcelMonkey[_190_] Excel Programming 9 February 11th 05 04:48 PM
Application Calculation Error Rick B[_4_] Excel Programming 2 December 2nd 03 08:49 PM
Application.Calculation=xlCalculationManual causing run time error? Dave Peterson[_3_] Excel Programming 3 October 18th 03 12:51 AM


All times are GMT +1. The time now is 07:32 AM.

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"