Posted: 2012-11-16 01:29
I have some code VBA code that creates a CSV file in Excel and the uploads the file to an FTP server. This code works great on WinXP Excel 2007. IT just upgraded me to Win7 64-bit and Excel 2010 64-bit.
Now when i try to run the code I get an error 429 "ActiveX component can't create object" when i try to run it. I'm running WinSCP 5.1 with the same .Net assembly/COM Lib. getting it registered was a pain but I was able to gt that done after modifying the RegAsm.exe.config to allow for network installations even though it was a local install. Am I just missing the the .NET/COM doesn't work on 64 bit systems or am i just missing something stupid?
This is the code where it breaks:
Dim MySession As New Session
Dim MySessionOptions As New SessionOptions
.Protocol = Protocol_Ftp
.FtpSecure = FtpSecure_Implicit
.HostName = "xxx.xxx.xxx.xxx"
.UserName = "xxx"
.Password = "xxx"
.portnumber = 990
.sslhostcertificatefingerprint = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
It lets me declare the variable and and it stops with the "With MySessionOptions" I have the .NET/COM listed in references and even tried WinSCP.Session and WinSCP.SessionOptions without success. It could possibly be a office 2010 and/or 64bit issue that I'm missing. I'm looking into that as well but was wondering if anyone else has run into anything like that.
Any help will be greatly appreceated
Posted: 2012-11-16 19:04
Running through MSDN trying to find an answer there I came across somthing that I belive answers my question.
Native 64-bit processes in Office 2010 cannot load 32-bit binaries. This includes the common controls of MSComCtl (TabStrip, Toolbar, StatusBar, ProgressBar, TreeView, ListViews, ImageList, Slider, ImageComboBox) and the controls of MSComCt2 (Animation, UpDown, MonthView, DateTimePicker, FlatScrollBar).These controls were installed by previous versions of Microsoft Office and are installed by 32-bit Office 2010. An alternative must be found for existing Microsoft Office VBA solutions that utilize these controls when the code is migrated to 64-bit Office 2010. 64-bit Office 2010 does not provide 64-bit versions of the Common Controls.
so sadly unless there is a 64bit version of the .NET assembly/COM library that Im not finding looks like this is my answer
Most likely to be related to this bug https://winscp.net/tracker/show_bug.cgi?id=869
Location: Prague, Czechia
You may need to register the WinSCP assembly using 64 version of RegAsm.
Please, let me know, if it helped or not!
The assembly itself target Any CPU, so it should work both on 32 and 64 bit. Though I have not really tested that.
You can post new topics in this forum
And it's free!