CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > migration_to_asp.net.migrating_from_asp_to_asp.net Tags:
Item Type: NewsGroup Date Entered: 9/23/2002 3:42:08 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 3 Views: 244 Favorited: 0 Favorite
4 Items, 1 Pages 1 |< << Go >> >|
jkowaluk
Asp.Net User
Using VBA.Collection object in .NET9/23/2002 3:42:08 PM

1

Hello,

I am converting an application from Classic ASP to ASP.NET. In Classic ASP, the following code works fine:

Dim myCollection as New Collection
myCollection = myObject.ReturnValue



myObject was built in VB6, and returns a Collection object.


When I put this code into ASP.NET, I get a casting error when trying to set the myCollection object to the ReturnValue. If I hover my mouse over the ReturnValue, I see that it is of type "VBA.Collection".

I then changed my .NET code to the following:

Dim myCollection as New VBA.Collection
myCollection = myObject.ReturnValue

This code also gives me an error:

COM object with CLSID {A4C4671C-499F-101B-BB78-00AA00383CBB} is either not valid or not registered.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: COM object with CLSID {A4C4671C-499F-101B-BB78-00AA00383CBB} is either not valid or not registered.


This error occurs on the variable declaration line "Dim myCollection as New VBA.Collection". When I check my project references, there is a "VBA" reference listed, and when I type the variable declaration, Visual Studio .NET's "Intellisense" feature recognizes the object type.


Anyone have any ideas?

Thank you,

Jason Kowaluk


jkowaluk
Asp.Net User
Re: Using VBA.Collection object in .NET9/23/2002 4:38:22 PM

1

Just a FYI:

If I declare myCollection as a VBA.CollectionClass object, the code seems to work fine.

Thanks,

Jason Kowaluk
kan_chee
Asp.Net User
Re: Using VBA.Collection object in .NET11/27/2002 2:21:39 AM

1

Hi,
I guess everything is working fine with you in reference to VBA.Collection

Presently I am facing a problem about VBA.Collection!!
Just hope you will resolve it!!

I have a VB6 Com server which uses a property as Collection. When I try to set this property from the Asp.net/C# environment I get the compatibility/typecasting errors.
Can you please forward me a snippet of a code to create a list of array in C# and then setting the property in VB6 as collection

I tried as follows for ArrayList, Array, VBA.collectionClass but nothings working:

ArrayList arrayTest = new ArrayList()
for(....)
{
//build the array test
arrayTest()=...
}
Test t = new Test();//the VB Dll Class
t.testColl = arrayTest;//set the testColl property of VBDLL which is of type VBA.collection

t.executesomemethod

Please Help!!

Thanks
anioak
Asp.Net User
Re: Using VBA.Collection object in .NET8/20/2004 2:07:33 PM

1

I am trying to do the same. You said the code seems to work if you define variable as VBA.Collection. But in my case it does not work.

I have a VB dll which has one class which exposes a collection. Now i want to use that collection in ASP.Net page. What i did was following.

I converted VB dll to .Net compatible dll with TlbImp utility and then i referenced that dll into my ASP.Net project. Everything works fine with the dll except this collection problem. Following is the code

Dim mycol As VBA.CollectionClass
mycol = objQRQuestionInfo.CollQPartInfo()

Where CollQPartInfo function returns a VB collection object.

Now what i see in .Net IDE is objQRQuestionInfo.CollQPartInfo is under lined and the message i see is "Reference required to assembly VBA containing the type VBA.Collection". But i have reference set to VBA.

Do i need to do anything extra? Please help

Thanks and regards

- ani
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Programming Excel with VBA and .NET Authors: Jeff Webb, Steve Saunders, Safari Tech Books Online (Online service), Pages: 1090, Published: 2006
VB.NET language in a nutshell: a desktop quick reference Authors: Steven Roman, Ronald Petrusha, Paul Lomax, Pages: 662, Published: 2002
Excel 2007 Vba: Programmers Reference Authors: John Green, Stephen Bullen, Rob Bovey, Michael Ale, Pages: 1174, Published: 2007
Office 2003 application development all-in-one desk reference for dummies Authors: Richard Mansfield, Pages: 836, Published: 2004
Excel 2003 VBA programmer's reference Authors: Paul Kimmel, Stephen Bullen, Rob Bovey, John Green, Robert Rosenberg, Brian Patterson, Pages: 1176, Published: 2004

Web:
Using VBA.Collection object in .NET - ASP.NET Forums myObject was built in VB6, and returns a Collection object. ... NET code to the following: Dim myCollection as New VBA.Collection ...
VBA Tips & Tricks: How to use collections in Excel VBA Net, c# and other technologies. This blog will also post articles related to .... Labels: Array of Objects in VBA, Collection of objects using Excel VBA, ...
Using Visual Basic .NET from VBA to Serialize Word Documents as XML Net.dll , provides objects for both VBA script in Word and the Visual Basic . .... Collections.Stack class invaluable while developing Visual Basic . ...
Data structures: VB and VBA offer two options: arrays and ... Data structures and algorithms using Visual Basic.NET · Get a Sound ... Arrays are zero-based in VBA (and in VB, although you can use the Option ... Each new item should be specifically added using the collection object's Add method. ...
Using vb.net collections in VBA through COMClass Using vb.net collections in VBA through COMClass. I've been using COMclass objects I create in vb.net (2003) from Excel VBA for ...

Using VBA.Collection object in .NET - ng.asp-net-forum ... Using VBA.Collection object in .NET, > ROOT > NEWSGROUP > Asp.Net Forum > migration_to_asp.net.migrating_from_asp_to_asp.net, ...
System.InvalidCastException to ArrayList? - ng.asp-net-forum ... Using VBA.Collection object in .NET - ng.asp-net-forum ... I tried as follows for ArrayList, Array, VBA. ... System. ...
Include files in the .aspx or .vb portion of the .Net Code - ng ... Using VBA.Collection object in .NET - ng.asp-net-forum ... NET code to the following: Dim myCollection as New VBA.Collection . ... how to deal include files ...
HTTP_REFERER in asp.net 2.0 - ng.asp-net-forum ... using vba.collection object in .net · operation timeout · asp to asp.net woes | projects in vs · include files in asp.net ...

Videos:
Advanced Excel VBA - Using the Collection Object Demonstrates a how to create the collection object, add data to it, and add the data to a listbox by looping through.
VBA Excel - Pulling from Access Shows how to pull data from programmatically from Microsoft Access and put to Excel. Access is never opened - the code connects to access and ...






ole objects in asp.net web matrix

asp.net shopping cart

refresh list of items in dropdown

xmlserializer ignores property

how to get selected value of parent dropdownlist to target dropdownlist using cascading

image relative paths

there is no row at position

input string not in a correct format. please help am stuck.

load user controls dynamically.

help caculating investment-- novice and yea its an assignment

drop down list validation

folder access

updatecommand and datakeys?????

displaying data from joined tables in label controls

how hard could it be?

system.drawing.color

problems connecting using web matrix

books and resources for learning asp.net

how to use visual sourcesafe (vss), rights.dat error

email validation in asp.net

browser history

how to force a new line?

how can i initialize an array of structures?

i cant upload a picture..help!

query for progressbar devbrasil.progressbar

response.transmitfile and writefile fails with unc path

simple <form> confirmation page

css not loading

time changes based on user's time zone

validating a time of the day

   
  Privacy | Contact Us
All Times Are GMT