using reference objects

  • Thread starter Thread starter redwebgeek
  • Start date Start date
R

redwebgeek

This is a newbie question, sorry.

I am trying to use VB.net to interact with Winfax 10.3, and keep
getting a "Specified Cast is not valid" error with the following.

Dim pageObj As wfxctl32.COleCoverPagesClass
pageObj = New wfxctl32.COleCoverPagesClass
Dim x As New Integer
x = pageObj.Count.ToString

Am I declaring this wrong. I've been trying for two days and am about
to try a bigger hammer.

Thanks for ANY help.
 
Hi,
I am trying to use VB.net to interact with Winfax 10.3, and keep
getting a "Specified Cast is not valid" error with the following.

Dim pageObj As wfxctl32.COleCoverPagesClass
pageObj = New wfxctl32.COleCoverPagesClass

Dim x As New Integer
x = pageObj.Count.ToString

You can put a string value into an integer. You have the choice here :

- you want to get an Integer value, use this :
Dim x As Integer = pageObj.Count

- you want to get a String value, use this :
Dim x As String = pageObj.Count.ToString

Regards;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top