VBA Example on Excel 2003???
Posted: Sat May 29, 2010 3:55 pm
I've now got my SUB-20 up and running. I can communicate with it using subtool.exe and see sent messages on the LCD.
I would like for this to work from VBA running within Excel 2003. I followed the NET component instructions in sub20net.pdf to create the TLB file and get the correct responses:
C:\>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe /codebase /tlb "C:\Program Files\SUB-20\bin\sub20dnc.dll"
Microsoft (R) .NET Framework Assembly Registration Utility
2.0.50727.1433
Copyright (C) Microsoft Corporation 1998-2004. All rights reserved.
Types registered successfully
Assembly exported to 'C:\Program Files\SUB-20\bin\sub20dnc.tlb', and the
type library was registered successfully
C:\>
I then add the tlb reference from Tools->References.
But when I run the sample book1.xls from the editor, I get an error in VBA:
Run-time error '-2147024894 (80070002)':
Automation error
The system cannot find the file specified.
I've tried unchecking the reference, closing and reloading the reference several times but to no avail.
Is this a common issue? Is there a way to fix this? I feel I'm close...
Best Regards,
George
I would like for this to work from VBA running within Excel 2003. I followed the NET component instructions in sub20net.pdf to create the TLB file and get the correct responses:
C:\>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe /codebase /tlb "C:\Program Files\SUB-20\bin\sub20dnc.dll"
Microsoft (R) .NET Framework Assembly Registration Utility
2.0.50727.1433
Copyright (C) Microsoft Corporation 1998-2004. All rights reserved.
Types registered successfully
Assembly exported to 'C:\Program Files\SUB-20\bin\sub20dnc.tlb', and the
type library was registered successfully
C:\>
I then add the tlb reference from Tools->References.
But when I run the sample book1.xls from the editor, I get an error in VBA:
Run-time error '-2147024894 (80070002)':
Automation error
The system cannot find the file specified.
I've tried unchecking the reference, closing and reloading the reference several times but to no avail.
Is this a common issue? Is there a way to fix this? I feel I'm close...
Best Regards,
George