A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Convert Coding into VB?



 
 
Thread Tools Display Modes
  #11  
Old December 14th, 2006, 06:11 PM posted to microsoft.public.access.forms
Curtis Stevens
external usenet poster
 
Posts: 231
Default Convert Coding into VB?

I did the compile, come up with this as error:

Dim mobjVoice As SpeechLib.SpVoice
Then
Set mobjVoice = New SpVoice
Then
on and on


I see nothing in the form's Load event that should raise that error. What
specific code is it complaining about? (You may have to do a Compile, under
the Debug menu).

The ListVoices function is in that form's code, and it definitely compiles
properly even if there's no reference set to sapi.dll.

I'd expect that once you fix the error(s) uncovered by the Compile, both
errors should be fixed.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Curtis Stevens" wrote in message
...
I'm doing the text to speech, type something in & it talks to me.

Ok, I created a new sample clean db, imported the frmSAPIDemo form only.
Opened form it says:

The expression on load you entered as the even prop setting produced the
following error: user-defined type not defined. HIT ok

Another error saying: ListVoices may not be a valid setting for the
RowSourceType property or there was a compile error in the function.

Curtis





  #12  
Old December 14th, 2006, 06:13 PM posted to microsoft.public.access.forms
Curtis Stevens
external usenet poster
 
Posts: 231
Default Convert Coding into VB?

Ahhh, that reference did it!!!!


I see nothing in the form's Load event that should raise that error. What
specific code is it complaining about? (You may have to do a Compile, under
the Debug menu).

The ListVoices function is in that form's code, and it definitely compiles
properly even if there's no reference set to sapi.dll.

I'd expect that once you fix the error(s) uncovered by the Compile, both
errors should be fixed.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Curtis Stevens" wrote in message
...
I'm doing the text to speech, type something in & it talks to me.

Ok, I created a new sample clean db, imported the frmSAPIDemo form only.
Opened form it says:

The expression on load you entered as the even prop setting produced the
following error: user-defined type not defined. HIT ok

Another error saying: ListVoices may not be a valid setting for the
RowSourceType property or there was a compile error in the function.

Curtis





  #13  
Old December 14th, 2006, 08:07 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default Convert Coding into VB?

Is the copy of the code on the web incorrect?

My copy has

Dim mbooBreakRequested As Boolean
'Dim mobjVoice As SpeechLib.SpVoice
Dim mobjVoice As Object

In other words, I'm using Late Binding, but I'm showing what the declaration
should be if using Early Binding in the commented section.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Curtis Stevens" wrote in message
...
I did the compile, come up with this as error:

Dim mobjVoice As SpeechLib.SpVoice
Then
Set mobjVoice = New SpVoice
Then
on and on


I see nothing in the form's Load event that should raise that error. What
specific code is it complaining about? (You may have to do a Compile,
under
the Debug menu).

The ListVoices function is in that form's code, and it definitely
compiles
properly even if there's no reference set to sapi.dll.

I'd expect that once you fix the error(s) uncovered by the Compile, both
errors should be fixed.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Curtis Stevens" wrote in
message
...
I'm doing the text to speech, type something in & it talks to me.

Ok, I created a new sample clean db, imported the frmSAPIDemo form
only.
Opened form it says:

The expression on load you entered as the even prop setting produced
the
following error: user-defined type not defined. HIT ok

Another error saying: ListVoices may not be a valid setting for the
RowSourceType property or there was a compile error in the function.

Curtis







 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:08 AM.


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