Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Type Mismatch error while checking range value

I use excel with a xla add in to get data from a system called Khalix.

Anyhow, I call a function to refresh data in my workbook and need to figure
out a way to confirm that it finished getting the data. Some formulas return
#Value! when the data is not retrieved/refreshed. My solution is to loop
until the cell doesn't equal #VALUE, but I get a type mismatch error when
checking. I've used the immediate window and the cell value contains Error
2015 not #VALUE.

Do Until lws_Template.Range("e13").Value < "Error 2015"
For li_counter2 = 1 To 10000
Next li_counter2
lws_Template.Calculate
Loop


Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Type Mismatch error while checking range value

Should your lws_Template.Calculate line be inside the For...Next loop?

"illini_99" wrote:

I use excel with a xla add in to get data from a system called Khalix.

Anyhow, I call a function to refresh data in my workbook and need to figure
out a way to confirm that it finished getting the data. Some formulas return
#Value! when the data is not retrieved/refreshed. My solution is to loop
until the cell doesn't equal #VALUE, but I get a type mismatch error when
checking. I've used the immediate window and the cell value contains Error
2015 not #VALUE.

Do Until lws_Template.Range("e13").Value < "Error 2015"
For li_counter2 = 1 To 10000
Next li_counter2
lws_Template.Calculate
Loop


Any ideas?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Type Mismatch error while checking range value

Yes, I believe it should.

The code fails on the Do Until line and never gets to the calculate function.

A lot of these workbooks are used with calculation mode set to manual, so I
am manually ensuring it re-calcs to ensure the #VALUE would resolve itself if
the data was retrieved.

Prior to retrieving the data, the Khalix proprietary Kfcell function returns
[data not read]. I pull in financial numbers and round to the nearest
thousand. The text [data not read] divided by the 1000 produces the #VALUE
error.

"JLGWhiz" wrote:

Should your lws_Template.Calculate line be inside the For...Next loop?

"illini_99" wrote:

I use excel with a xla add in to get data from a system called Khalix.

Anyhow, I call a function to refresh data in my workbook and need to figure
out a way to confirm that it finished getting the data. Some formulas return
#Value! when the data is not retrieved/refreshed. My solution is to loop
until the cell doesn't equal #VALUE, but I get a type mismatch error when
checking. I've used the immediate window and the cell value contains Error
2015 not #VALUE.

Do Until lws_Template.Range("e13").Value < "Error 2015"
For li_counter2 = 1 To 10000
Next li_counter2
lws_Template.Calculate
Loop


Any ideas?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Type Mismatch error while checking range value

You could check for the text:

Do Until lws_Template.Range("e13").Text < "#VALUE!"

or maybe you could look for any old error

Do Until not iserror(lws_Template.Range("e13").Value)



illini_99 wrote:

I use excel with a xla add in to get data from a system called Khalix.

Anyhow, I call a function to refresh data in my workbook and need to figure
out a way to confirm that it finished getting the data. Some formulas return
#Value! when the data is not retrieved/refreshed. My solution is to loop
until the cell doesn't equal #VALUE, but I get a type mismatch error when
checking. I've used the immediate window and the cell value contains Error
2015 not #VALUE.

Do Until lws_Template.Range("e13").Value < "Error 2015"
For li_counter2 = 1 To 10000
Next li_counter2
lws_Template.Calculate
Loop


Any ideas?


--

Dave Peterson
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
Conditional Formatting - Run Time Error '13' Type Mismatch Error ksp Excel Programming 0 July 11th 06 07:06 AM
Type mismatch using rnge as Range with Type 8 Input Box STEVE BELL Excel Programming 11 December 3rd 05 05:02 AM
Help: Compile error: type mismatch: array or user defined type expected lvcha.gouqizi Excel Programming 1 October 31st 05 08:20 PM
Type Mismatch error & subscript out of range error Jeff Wright[_2_] Excel Programming 3 May 14th 05 07:14 PM
Code works 1st time then Type Mismatch when checking for not blank cells Colleyville Alan Excel Programming 3 February 6th 04 05:21 AM


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