I had used this before but now i get an "expected function or variable error" with this line of code. I get error as soon as I run macro but i cannot see what is at fault
selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlDivide, SkipBlanks _
:=False, Transpose:=False
Whole macro here
Sub knmitxtfile()
Dim fNameAndPath As Variant
fNameAndPath = Application.GetOpenFilename(FileFilter:=Filt, FilterIndex:=FilterIndex, Title:="Select File To Be Opened")
If fNameAndPath = False Then Exit Sub
Workbooks.OpenText Filename:=fNameAndPath, Origin:= _
437, startrow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=False, Comma:=True _
, Space:=False, Other:=False, FieldInfo:=Array(1, 1), _
TrailingMinusNumbers:=True
Range("V9").Select
ActiveCell.FormulaR1C1 = "10"
Range("v9").Copy
Sheet1.Range("K25", Range("S65536").End(xlUp)).Select
selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlDivide, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("M25:O25").Select
Range(selection, selection.End(xlDown)).Select
selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlDivide, SkipBlanks _
:=False, Transpose:=False
Range("P24").Select
Application.CutCopyMode = False
End Sub
Bookmarks