473,398 Members | 2,427 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

please please please Specified Cast is not valid error

Please help me. ANY guess or ideas welcome
I am trying to list the types of coverpages available in winfax 10. I
have the imports at the top of the page.
Every time I run this I get a "Specified Cast is not valid" error. I
guess this makes sense since the .count item is a short, but I have
dimed x as short. Any ideas. please :roll:
Dim x As Short

Dim objWinfaxSend As New wfxctl32.COleCoverPages
x = objWinfaxSend.Count()

It should hurt to be a programmer

Nov 21 '05 #1
4 1805
* wa*********@hotmail-dot-com.no-spam.invalid (redwebgeek) scripsit:
I am trying to list the types of coverpages available in winfax 10. I
have the imports at the top of the page.
Every time I run this I get a "Specified Cast is not valid" error. I
guess this makes sense since the .count item is a short, but I have
dimed x as short. Any ideas. please :roll:
Dim x As Short

Dim objWinfaxSend As New wfxctl32.COleCoverPages
x = objWinfaxSend.Count()


Are you really sure the exception occurs on this line? Maybe it occurs
in the implementation of the 'Count' property/method. Can you post the
complete exception text and/or callstack?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2
Hi,

I appreciate you looking at this. It definately occurs on the
x =
objWinfaxSend.Count() line, when I
comment this out it runs. Doesn't do anything, but runs.

The Error in a messagebox that is called form 1 and say "Specified
Cast is not valid" then has an OK button. I opened the Callstack
window as you suggested and its empty. Both during the error and
after I hit OK.

when I do
[code:1:ab8216d443]MsgBox(TypeName(objWinfaxSend))[/code:1:ab8216d443]
I get a box saying
[quote:ab8216d443]COleCoverPagesClass[/quote:ab8216d443].

Thanks. Let me know if I can provide any other info.

Nov 21 '05 #3
On 12 Aug 2004 14:03:45 -0500, redwebgeek wrote:
Please help me. ANY guess or ideas welcome
I am trying to list the types of coverpages available in winfax 10. I
have the imports at the top of the page.
Every time I run this I get a "Specified Cast is not valid" error. I
guess this makes sense since the .count item is a short, but I have
dimed x as short. Any ideas. please :roll:
Dim x As Short

Dim objWinfaxSend As New wfxctl32.COleCoverPages
x = objWinfaxSend.Count()

It should hurt to be a programmer


You've defined x as Short. What is the return type of the
objWinfaxSend.Count method?

--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
Nov 21 '05 #4
When I mouse over
[quote:4e4bc92ace]objWinfaxSend.Count()[/quote:4e4bc92ace] I get the
yellow help text that say [quote:4e4bc92ace]Public Overridable
property Count () As Short[/quote:4e4bc92ace]

Thanks

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ron Holmes | last post by:
I posted this question on the Crystal Reports Support site and I am still waiting for an answer. Using Crystal Reports 9.0 Developer Full edition: My Crystal report .RPT file has a Picture box...
5
by: .Net Sports | last post by:
I have a datagrid codebehind script that takes data from sql dbase and displays it in a footer row as a total. One column has amount_dollars (which works fine), while another has new sales (which...
4
by: Tyro | last post by:
Can someone shed some light on my error here? Thanks! Specified cast is not valid. Exception Details: System.InvalidCastException: Specified cast is not valid. Source Error: Stack Trace:
3
by: PK9 | last post by:
I am looking for assistance in pinpointing the cause of the following exception. I am getting a "Specified Cast is not valid" exception on my page. I am trying to populate a datagrid. One of my...
2
by: Fabian | last post by:
Hi, I work with asp.net 2.0 and I have a intermittent error, only happens a few times a day. In the page I evaluate a Query String and then I get data form a database. The code snipped: ...
0
by: QA | last post by:
I am using a Business Scorecard Accelarator in a Sharepoint Portal 2003 using SQL Server 2005 I am getting the following error: Error,5/7/2005 10:50:14 AM,580,AUE1\Administrator,"Specified cast is...
0
by: df | last post by:
I'm seeing a strange problem in the Web App config tool: After creating a role and a user, going back to the Security tab home page, I get a "Specified cast is not valid" error. I've set up my...
3
by: keithb | last post by:
Using a GridView, I get a "Specified cast is not valid" error when binding the Visible propery of a hyperlink control to a DataTable text field. The error goes away if I replace the data binding...
3
by: =?Utf-8?B?UGF1bCBQcmV3ZXR0?= | last post by:
I'm attempting to use LINQ to insert a record into a child table and I'm receiving a "Specified cast is not valid" error that has something to do w/ the keys involved. The stack trace is: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.