Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

PeBoe

Sorry Martin

after further playing around with my example code I discovered my error (an uninitialized variable within my method); as often, just a copy/paste error :evil:

After the small correction, the code runs perfectly !

Thanks a lot for your efficient support :D

Friendly regards

P.Boehm
martin

PeBoe wrote:

I'm working with Excel 2003 SP3

I would not expect this to differ between 2003 and 2010.
Anyway, can you post your complete code?
PeBoe

Sorry, forgot to add: using VBA
PeBoe

I'm working with Excel 2003 SP3
martin

Re: COM library putFiles giving error on VBA

Your code works for me in VBA 7.0 (Excel 2010). Are you using VBA or VB?
PeBoe

COM library putFiles giving error on VBA

Hi

I'm trying to use the COM object in VBA; after successful creation and initialization of a session object which I call m_session I try:

Dim transferResult As TransferOperationResult
transferResult = m_session.putFiles(localPath, remotePath)

also tried:
set transferResult = m_session.putFiles(localPath, remotePath)

But I always get an Error: "object reference not set to an instance of an object"

NOTE: I know m_session is OK, because when using it with m_session.ExecuteCommand('any UNIX cmd') it works fine

Working with:
Microsoft Windows XP Professional; Version 5.1.2600 Service Pack 3 Build 2600
Microsoft Visual Basic 6.5
WinSCP 5.1.7
WinSCP COM Assemmbly 5.1.7

Thanks for your help
PeBoe