Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Active X Control Help

I am having trouble running the code below. When I run it my message test
tells me I'm connected. But I still get the Run-time error '1004' Method
"Save As' of object _WorkBook failed. I have to go to the Excel open dialog
box and Look in: Add/Modify FTP Locations. Click on ftp selction I want,
then it prompts me to enter User Name and Password. This is what I am trying
to avoid. Maybe I need to use some other way to ftp the file instead of the
SaveAs? How else can I do this?



"Sami Askar" wrote in message
m...
I use an ActiveX control from http://www.chilkatsoft.com/

Set chilkatFTP = CreateObject("ChilkatFTP.ChilkatFTP")

'FTP Parameters
chilkatFTP.Hostname = hostip
chilkatFTP.UserName = username
chilkatFTP.Password = password

'Connect
chilkatFTP.Connect

'Was the connection successful?
If chilkatFTP.IsConnected Then
'lblMessage.Caption = "Connected"
ActiveWorkbook.SaveAs Filename:=
"ftp://123.456.7.89/path/invoice.dat", FileFormat:=xlTextPrinter,
CreateBackup:=False
Else
lblMessage.Caption = "Not connected"
End If






"Grant" wrote in message
...
How can I test to make sure my FTP connection is connected before I
execute
my code.

Thanks
Grant


ActiveWorkbook.SaveAs Filename:= _
"ftp://123.456.7.89/path/invoice.dat", FileFormat:=xlTextPrinter _
, CreateBackup:=False




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 205
Default Active X Control Help

Hi Grant,

This is what I am trying
to avoid. Maybe I need to use some other way to ftp the file instead of the
SaveAs? How else can I do this?


Just a suggesting, but you could try embedding the username and password in
the ftp location:

ActiveWorkbook.SaveAs "

Regards

Stephen Bullen
Microsoft MVP - Excel
www.oaltd.co.uk


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Active X Control Help

I've tried that and it doesn't work. I get the same run time error.




"Stephen Bullen" wrote in message
...
Hi Grant,

This is what I am trying
to avoid. Maybe I need to use some other way to ftp the file instead of
the
SaveAs? How else can I do this?


Just a suggesting, but you could try embedding the username and password
in
the ftp location:

ActiveWorkbook.SaveAs "

Regards

Stephen Bullen
Microsoft MVP - Excel
www.oaltd.co.uk




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 205
Default Active X Control Help

Hi Grant,

I've tried that and it doesn't work. I get the same run time error.


Darn! Then I guess the only choice is to save the file locally, then
transfer it using the FTP control.

Regards

Stephen Bullen
Microsoft MVP - Excel
www.oaltd.co.uk


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ACTIVE X CONTROL? Jase Excel Discussion (Misc queries) 1 May 9th 08 12:49 AM
Difference between a Forms Control verus Active-X Control funGT350 Excel Discussion (Misc queries) 6 May 6th 08 11:20 PM
how to set active x control sharlie Excel Discussion (Misc queries) 0 March 30th 06 01:27 AM
Tool Tip Text for Form control/ Active-X control Freddie[_2_] Excel Programming 0 October 19th 04 04:14 AM
Active X Control Anand CS Excel Programming 0 July 9th 03 05:02 AM


All times are GMT +1. The time now is 08:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"