Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default worksheet calculate

Hi, I use 'Private Sub Worksheet_Calculate()' to fire certain code. Ive
done this in several workbooks, and had no problems, until now. Ive
started a new workbook, pasted some code into 'Private Sub
Worksheet_Calculate()', and the sheet is not calculating. The code I
use is from another workbook, and it works perfect in that book. I tend
to use prev code and modify it. The only way around this is to rename
the original workbook and modify the code. No big deal, but why is this
happening. Any ideas what could have changed. I looked in the options,
that apears the same. The worksheet not locked, and ive tried format
the cells in every option to no avail. Any ideas.
Regards Robert

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default worksheet calculate

Robert,
Check the values of:
Application.EnableEvents
Application.Calculation

But if no cells have been marked as Dirty (because formulae/precedents etc
change), no Calculate event will occur.
e.g. A1 is changed from "text1" to "text2" will not fire this event.

NickHK

"RobcPettit" wrote in message
oups.com...
Hi, I use 'Private Sub Worksheet_Calculate()' to fire certain code. Ive
done this in several workbooks, and had no problems, until now. Ive
started a new workbook, pasted some code into 'Private Sub
Worksheet_Calculate()', and the sheet is not calculating. The code I
use is from another workbook, and it works perfect in that book. I tend
to use prev code and modify it. The only way around this is to rename
the original workbook and modify the code. No big deal, but why is this
happening. Any ideas what could have changed. I looked in the options,
that apears the same. The worksheet not locked, and ive tried format
the cells in every option to no avail. Any ideas.
Regards Robert



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default worksheet calculate

Thankyou for your reply. Ive checked the values and there both correct.
Made no difference though.
Regards Robert
NickHK wrote:
Robert,
Check the values of:
Application.EnableEvents
Application.Calculation

But if no cells have been marked as Dirty (because formulae/precedents etc
change), no Calculate event will occur.
e.g. A1 is changed from "text1" to "text2" will not fire this event.

NickHK

"RobcPettit" wrote in message
oups.com...
Hi, I use 'Private Sub Worksheet_Calculate()' to fire certain code. Ive
done this in several workbooks, and had no problems, until now. Ive
started a new workbook, pasted some code into 'Private Sub
Worksheet_Calculate()', and the sheet is not calculating. The code I
use is from another workbook, and it works perfect in that book. I tend
to use prev code and modify it. The only way around this is to rename
the original workbook and modify the code. No big deal, but why is this
happening. Any ideas what could have changed. I looked in the options,
that apears the same. The worksheet not locked, and ive tried format
the cells in every option to no avail. Any ideas.
Regards Robert


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default worksheet calculate


Hi, Ive checked and its in the correct worksheet. Same things happened
again. Id used a project that I new was ok, recoded with a user form,
had it working oerfecr all day. Made some alteretions to the user form,
basicalliy added some control buttons to enter the reulst in the
textboxs to a worksheet, and a label to show todays date. Now
WS.Calculate gone again. Removing what Ive added hasnt helped.
Regards Robert

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default worksheet calculate

Hi, I put a simple formula in a cell and this seems to work. The data
is from a live streem so range("a1") changes from 1 through to 6. In
another range I put =a1/1. Basic but done the trick. Still like to know
why it stopped working though.
Regards Robert


RobcPettit wrote:
Hi, Ive checked and its in the correct worksheet. Same things happened
again. Id used a project that I new was ok, recoded with a user form,
had it working oerfecr all day. Made some alteretions to the user form,
basicalliy added some control buttons to enter the reulst in the
textboxs to a worksheet, and a label to show todays date. Now
WS.Calculate gone again. Removing what Ive added hasnt helped.
Regards Robert


Reply
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
Worksheet will not calculate jk85016 Excel Discussion (Misc queries) 1 May 19th 06 02:41 PM
Can I calculate just one worksheet in a multi-worksheet workbook? Captive Thinker Excel Discussion (Misc queries) 3 March 2nd 06 10:36 AM
tracking changes using worksheet calculate toolman[_2_] Excel Programming 0 September 3rd 04 06:36 AM
Worksheet Calculate Event Gustavo[_4_] Excel Programming 2 January 14th 04 09:00 PM


All times are GMT +1. The time now is 06:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"