Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a program written in VB6 that opens an Excel App;ication, selects a worksheet and reads the data from 6 Cols x 15 Rows. This data is placed into an array formated to type double and then VB6 performs some math calculations. No problem. I tried to convert this small program to VB.NET and the best I can get is an error message to the effect that the type Range cannot be converted to a type double. I have upgraded my Office XP with the necessary Interop according to Microsoft and have added the necessary references to my main program. I did have all of my Excel calling and reading routines in a module but now I'm trying to get away from a module situation. My 'not working code' can be provided if someone is willing to look at it
Thanks for anyones help Pet |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Are you explicitly using the range's Value (or equivalent) property
i.e. something like CDbl(Range("A1").Value) rather than the sloppy CDbl(Range("A1")) This is a heads up for everyone out there who implicitly use the Range object's default method. Always *explicitly* use the Value method, otherwise it may trip you up one day! -- "Pete" wrote in message ... I have a program written in VB6 that opens an Excel App;ication, selects a worksheet and reads the data from 6 Cols x 15 Rows. This data is placed into an array formated to type double and then VB6 performs some math calculations. No problem. I tried to convert this small program to VB.NET and the best I can get is an error message to the effect that the type Range cannot be converted to a type double. I have upgraded my Office XP with the necessary Interop according to Microsoft and have added the necessary references to my main program. I did have all of my Excel calling and reading routines in a module but now I'm trying to get away from a module situation. My 'not working code' can be provided if someone is willing to look at it. Thanks for anyones help. Pete |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do i name a range of data in excel | Excel Worksheet Functions | |||
Excel 2003 - Charts - "Data Range" and Date/Time data on X-Axis | Charts and Charting in Excel | |||
Excel Addin:Setting the range to the Excel.Range object range prop | Excel Worksheet Functions | |||
how can i use same range of data for different formulas in excel? | Excel Discussion (Misc queries) | |||
Range of data in Excel | Excel Worksheet Functions |