kelisaid
05-25-2017, 08:48 AM
Hi All!
I'm fairly new to VBA and am attempting to just save my file as a csv. Basically I have a workbook that is connected to an XML feed so it updates when I need it to. When I refresh the doc I call my program substitution function(which just does a loop through a column and changes values to something I can import in our CRM so there are matching values). After this is completed, I'd like for the new results to be automatically saved to a csv file for import.
This is the code I currently have set up:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.DisplayAlerts = False
Call ProgramSubstitutions
ActiveWorkbook.SaveCopyAs Filename:="G:\Enroll_Dev\ADMISSIONS AND RECRUITMENT ACTIVITIES\Admissions\Keystone\internationalimports.csv", FileFormat:=xlCSV
End Sub
However everytime I run it I'm getting this error: Compile Error: Named Argument not Found and it's highlighting the FileFormat:=
19286
Ugh what am I doing wrong? I'm assuming it's something super simple and I have looked and looked to see what may be happening but I can't find a solution. :hairpull:
TIA
I'm fairly new to VBA and am attempting to just save my file as a csv. Basically I have a workbook that is connected to an XML feed so it updates when I need it to. When I refresh the doc I call my program substitution function(which just does a loop through a column and changes values to something I can import in our CRM so there are matching values). After this is completed, I'd like for the new results to be automatically saved to a csv file for import.
This is the code I currently have set up:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.DisplayAlerts = False
Call ProgramSubstitutions
ActiveWorkbook.SaveCopyAs Filename:="G:\Enroll_Dev\ADMISSIONS AND RECRUITMENT ACTIVITIES\Admissions\Keystone\internationalimports.csv", FileFormat:=xlCSV
End Sub
However everytime I run it I'm getting this error: Compile Error: Named Argument not Found and it's highlighting the FileFormat:=
19286
Ugh what am I doing wrong? I'm assuming it's something super simple and I have looked and looked to see what may be happening but I can't find a solution. :hairpull:
TIA