Hi forum
I am trying to import data from a semi colon delimited csv file.
1st attempt, i discovered that excel assumed that the delimiter was ","
trying to correct this, i get an syntax error, or a compile error "expected; end of statement" -- marking the "," after the filepath.
The videos/posts I've found writes the code as I do, but is not getting any errors - Anyone knows what I'm overseeing?
Thanks in advance - Jeppe
I am trying to import data from a semi colon delimited csv file.
1st attempt, i discovered that excel assumed that the delimiter was ","
trying to correct this, i get an syntax error, or a compile error "expected; end of statement" -- marking the "," after the filepath.
The videos/posts I've found writes the code as I do, but is not getting any errors - Anyone knows what I'm overseeing?
Thanks in advance - Jeppe
VBA Code:
Sub get_data()
Dim Wb1 As Workbook
Application.ScreenUpdating = False
Set Wb1 = Workbooks.Open("C:\xxxxxx\Varmeprognose.csv"), DataType:= xlDelimited, Semicolon:= True, DecimalSeparator:= ",", ThousandsSeparator:="."
Wb1.Sheets(1).Range("A1:C200").Copy
Wb1.Close SaveChanges:=False
Application.ScreenUpdating = True
Range("A1").Select
ActiveSheet.Paste
End Sub