Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default calling a function

I am having problems with my find match function in VBA, this workbook
is linked to another workbook, and the reference cells come from that
workbook, this doesn't always calculate because there has been no event
that triggers the calculation,
Right now I have a macro that goes back to that work book and rewrites
a formula in one of the cells just to trigger the calculation, is there
a more efficient way to do this?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default calling a function

To force a particular sheet or range to recaulculate, you may use the
Calculate method.

For example,

workbooks(book_name).Worksheets(sheet_name).calcul ate

Regards,
Edwin Tam

http://www.vonixx.com


"dmexcel" wrote:

I am having problems with my find match function in VBA, this workbook
is linked to another workbook, and the reference cells come from that
workbook, this doesn't always calculate because there has been no event
that triggers the calculation,
Right now I have a macro that goes back to that work book and rewrites
a formula in one of the cells just to trigger the calculation, is there
a more efficient way to do this?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default calling a function

I would have thought that if the other workbook doesn't recalculate, then
there is nothing to recalculate, so your forcing a recalculation is
superfluous. Why do you think you need to force it?

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"dmexcel" wrote in message
oups.com...
I am having problems with my find match function in VBA, this workbook
is linked to another workbook, and the reference cells come from that
workbook, this doesn't always calculate because there has been no event
that triggers the calculation,
Right now I have a macro that goes back to that work book and rewrites
a formula in one of the cells just to trigger the calculation, is there
a more efficient way to do this?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default calling a function

Hi,
If I enter the numbers manually, it works fine,
If I reference the numbers say =thisworkbook,thissheet,this range
When the numbers change, it doesn't always recalculate unless I double
click on the cell or do something to it, to trigger the function

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default calling a function


A couple of thoughts:
1) If this is a function procedure called from a worksheet, make sure
all inputs are passed to the function as arguments. This way, Excel
will know how the function fits into its dependency tree and can
calculate it correctly.
2) If this is part of a Sub procedure, then make the procedure part of
the appropriate calculate/change/other event procedure.

Does that help?


--
MrShorty
------------------------------------------------------------------------
MrShorty's Profile: http://www.excelforum.com/member.php...o&userid=22181
View this thread: http://www.excelforum.com/showthread...hreadid=515197



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default calling a function

HHMM!,
I am sure that is what I have to do but don't know how
Andy

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
Calling a function in my SQL-DB from VBA KSor Excel Discussion (Misc queries) 0 March 11th 09 02:08 PM
Calling Function mattsvai[_18_] Excel Programming 4 February 13th 06 10:49 PM
calling a new function Excel gives me #NAME? Mark Dvorkin Excel Worksheet Functions 4 July 10th 05 01:29 AM
calling a function praptisahni Excel Programming 2 April 26th 04 05:17 PM
problems calling this function Pal Excel Programming 1 February 13th 04 06:24 PM


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