Dag,
Tot voor kort kon ik altijd plaatjes en csv bestanden eenvoudig via Excel VBA uploaden naar mijn FTP.
Nu heb ik een eigen server en er is nu SFTP opgezet door de IT-er.
Ik kan nu niet meer automatisch uploaden. Iemand enig idee of dat nog wel kan naar SFTP?
Ik gebruikte voorheen bv deze code:
Dim TempChart As Variant
Dim ImageName1 As String
Dim ImageName As String
Dim FinalImagePath As String
Dim InRange As Range
Dim DiscName As String
Dim ftpLogin As String
Dim ftpPassword As String
Dim ftpPath As String
Dim a As Object
Dim fs As Object
Dim ftpSite As String
Dim TempFolderName As String
'---------------------------------------------------------------------------------
'set variable parameters
TempFolderName = "zqqftptemp"
DiscName = "C" 'put the name of disc for temporary files, for example "D".
ftpSite = "xxxxxxx 'put the website name, for example "mywebsite.com"
ftpPath = "/articles" 'put the path to ftp folder, for example "/public_html/uploaded_files/"
ftpLogin = "xxxxx" 'put your ftp login, for example "john123"
ftpPassword = "xxxxxxx" 'put your ftp password, for example "pass123"
'---------------------------------------------------------------------------------
Application.ScreenUpdating = False
'copy the appropriate range
Workbooks("Outlook lists.xlsm").Activate
Worksheets("csv").Range("A1:P11").Copy
'export as an image
MkDir DiscName & ":\" & TempFolderName & "\"
FinalImagePath = DiscName & ":\" & TempFolderName & "\" & "outlooks.csv"
'add new workbook and paste copied range
Workbooks.Add
ActiveSheet.Paste
Alvast heel erg bedankt,
Gr Ronald
Tot voor kort kon ik altijd plaatjes en csv bestanden eenvoudig via Excel VBA uploaden naar mijn FTP.
Nu heb ik een eigen server en er is nu SFTP opgezet door de IT-er.
Ik kan nu niet meer automatisch uploaden. Iemand enig idee of dat nog wel kan naar SFTP?
Ik gebruikte voorheen bv deze code:
Dim TempChart As Variant
Dim ImageName1 As String
Dim ImageName As String
Dim FinalImagePath As String
Dim InRange As Range
Dim DiscName As String
Dim ftpLogin As String
Dim ftpPassword As String
Dim ftpPath As String
Dim a As Object
Dim fs As Object
Dim ftpSite As String
Dim TempFolderName As String
'---------------------------------------------------------------------------------
'set variable parameters
TempFolderName = "zqqftptemp"
DiscName = "C" 'put the name of disc for temporary files, for example "D".
ftpSite = "xxxxxxx 'put the website name, for example "mywebsite.com"
ftpPath = "/articles" 'put the path to ftp folder, for example "/public_html/uploaded_files/"
ftpLogin = "xxxxx" 'put your ftp login, for example "john123"
ftpPassword = "xxxxxxx" 'put your ftp password, for example "pass123"
'---------------------------------------------------------------------------------
Application.ScreenUpdating = False
'copy the appropriate range
Workbooks("Outlook lists.xlsm").Activate
Worksheets("csv").Range("A1:P11").Copy
'export as an image
MkDir DiscName & ":\" & TempFolderName & "\"
FinalImagePath = DiscName & ":\" & TempFolderName & "\" & "outlooks.csv"
'add new workbook and paste copied range
Workbooks.Add
ActiveSheet.Paste
Alvast heel erg bedankt,
Gr Ronald