Last post Jul 03, 2014 01:40 PM by eps123
Jun 05, 2014 04:33 PM|eps123|LINK
I have a system that runs under excel vb and I want to convert it to run in asp on my site. I boldly set about converting and at first it seemed easy enough. I've learned differently.
It seems that most of the codeconverts directly, but the missing elements are the basic IO statements such as open, close, get, put and write. The reference manuals
I found seem to have obliterated all reference to those. There was a promising bit I found on the forum that talked about a wizard that will convert code from VB6 to asp.net vb.
If someone out here understands my dilemma, I'd appreciate the following: First, am I in the correct universe? My excel is excel 2010. Is the vb there vb6? Why do I not find this wizard running in my vs 2010?
Finally, do I need to start learning everything from the bottom up, I'e., namespaces, methods and classes? I've gotten by without this layer for 50 years, but I'll do what it takes and will appreciate a headstart from anyone.
Jun 05, 2014 05:12 PM|PatriceSc|LINK
Excel uses VBA (Visual Basic for Application). An Excel application and a web application have not much in common. So I'm not sure what this app does but the conversion is unlikely that easy. For example you won't be able to write on the client side disk.
This is sometimes a catch for beginners as typically when you create a web app on your dev box, the server and the client are the same machine so it can give the impression that your code can access the client side disk. Once it is deployed, you then realize
that the server code is actually only able to write to the web server disk.
Jun 05, 2014 05:14 PM|Mikesdotnetting|LINK
The code in your Excel application is likely to be VBA. This might help although it is quite old: http://msdn.microsoft.com/en-us/library/office/aa192490(v=office.11).aspx.
However, I suspect your only solution is to rewrite from scratch. You could paste the VBA code into a Web Form and then try to fiix errors, but that way usually only leads to a world of pain and frustration in my experience. So, yes, you will have to learn
what you need to learn.
Jun 05, 2014 06:49 PM|eps123|LINK
I am delighted with your response. I can live with not being able to access the client disk. My app creates a couple of reports that could be displayed after it runs. My problems are knowing asp vb and how to implement the basic commands of opening,
reading/writing and closing files. I gather that this is where I need to learn all about methods and namespaces. I appreciate your effort. What do you advise as the next step toward illumination? The walkthroughs of MS, or is there something less time-consuming?
Jun 06, 2014 02:32 AM|Mikesdotnetting|LINK
Rather than start from scratch with VB (cause you know more of it than you perhaps realise at the moment), just Google what it is that you want to do and try the code you find in your search results:
Jul 03, 2014 01:40 PM|eps123|LINK
Just to complete the issue, I was able to come very close to a valid answer thru the addition of the "imports Microsoft.visualbasic"