Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default run time error(13) type mismatch in Excel Feed

I am using this VB code in Excel to create an audible stock quote when
the price of the stock change using Excel's 2002 SP3 speech recognition
capabilities.

The stock price is coming from a live feed from another software
program API that outputs the stock information to excel.

As the price(cell value) changes Speech playback calls out the new
stock price.

It works fine except when I open the excel spreadsheet initially I get
the VB error " run time error(13) type mismatch " on the the line
"curValue = [b7].Value2"
Cell B7 contains the stock quote data feed and as it changes the speech
recognition is activated.

When I get the error message , if I just press "Run" instead of "Debug"
then the program works fine. So it appears to be an issue in defining
the original value for "Oldvalue"

I am not a programmer and don't have any expertise in VB , so please
don't get too technical in any explanation.

Thanks, Here is what I have so far:


Option Explicit
Public Say As Speech
Public OldValue As Double
Public curValue As Double

Private Sub Worksheet_Activate()
OldValue = 1
End Sub

Private Sub Worksheet_Calculate()
If Say Is Nothing Then Set Say = Application.Speech

curValue = [b7].Value2
If OldValue < curValue Then
OldValue = [b7].value
'Say.Speak " value of"
Say.Speak [b7].Text
'Say.Speak [B2].Text
End If
End Sub

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
run time error 13 type mismatch Rob Bovey Excel Programming 3 April 13th 10 12:09 PM
run-time error 13: Type mismatch? Marko Enula Excel Discussion (Misc queries) 2 February 5th 08 01:00 PM
Run-time error '13':Type mismatch Sibilia[_9_] Excel Programming 2 July 3rd 05 08:54 PM
run time error 13 type mismatch kkknie[_170_] Excel Programming 0 July 20th 04 03:28 PM
Run Time Error '13' Type mismatch David Adamson[_3_] Excel Programming 2 June 10th 04 04:00 AM


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